I wondered whether something like this would compile:
macro_rules! foo {
( r###"hello"### ) => {}; // 3 #-es
}
foo!( r##"hello"## ); // 2 #-es
It appears it does not, but this is not documented on the reference chapter about Macros By Example. There should be a section explaining the exact rules by which tokens are compared; there may be existing code out there that relies on behavior like this. Other examples I can think of:
I wondered whether something like this would compile:
It appears it does not, but this is not documented on the reference chapter about Macros By Example. There should be a section explaining the exact rules by which tokens are compared; there may be existing code out there that relies on behavior like this. Other examples I can think of: