Closed
Description
...or at least that's how much I currently understand, since macros are really counterintuitive sometimes.
macro_rules! m {
( $i:ident ) => ();
( $t:tt $j:tt ) => ();
}
fn main() {
m!(c);
m!(t 9); // why does this work, but not the next case?
m!(0 9);
// ^ error: expected ident, found 0
}
I don't think this is supposed to happen. Even if it is, the exact rules used for macro matching should definitely be documented somewhere (I think there's not even an RFC).