You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To keep this system simple and correct, #[macro_use] extern crate ... may only appear at the root of your crate, not inside mod. This ensures that $crate is a single identifier.
However the second sentence isn't true. $crate is either nothing or a path with one :: and one identifier. That is, this pair of macros doesn't work, either when called from within the crate or from another one:
macro_rules! b {($i:ident) => { stringify!($i);}}macro_rules! a {() => (b!($crate))}
The text was updated successfully, but these errors were encountered:
The macros chapter says:
However the second sentence isn't true.
$crate
is either nothing or a path with one::
and one identifier. That is, this pair of macros doesn't work, either when called from within the crate or from another one:The text was updated successfully, but these errors were encountered: