E.g.
pub macro inc {
($x:expr) => { $x + 1 };
}
crate::inc!(2);
#[test]<caret>
fn test() {
inc!(0);
}
expands the inc!(0) without the context instead of #[test]. However
pub macro inc {
($x:expr) => { $x + 1 };
}
#[test]<caret>
fn test() {
inc!(0);
}
crate::inc!(2);
gives incorrect result - part of the test expanded code is missing.
When crate::inc!(2); is removed - everything works as expected