Closed
Description
The macros chapter says:
To keep this system simple and correct,
#[macro_use] extern crate ...
may only appear at the root of your crate, not insidemod
. 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)) }
Metadata
Metadata
Assignees
Labels
No labels