diff options
Diffstat (limited to 'tests/ui/proc-macro/dollar-crate-issue-101211.rs')
-rw-r--r-- | tests/ui/proc-macro/dollar-crate-issue-101211.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/ui/proc-macro/dollar-crate-issue-101211.rs b/tests/ui/proc-macro/dollar-crate-issue-101211.rs new file mode 100644 index 000000000..fc1acfd32 --- /dev/null +++ b/tests/ui/proc-macro/dollar-crate-issue-101211.rs @@ -0,0 +1,29 @@ +// check-pass +// edition:2021 +// aux-build:test-macros.rs + +#![no_std] // Don't load unnecessary hygiene information from std +extern crate std; + +#[macro_use] +extern crate test_macros; + +macro_rules! foo { + ($($path:ident)::*) => ( + test_macros::recollect!( + $($path)::* + ) + ) +} + +macro_rules! baz { + () => ( + foo!($crate::BAR) + ) +} + +pub const BAR: u32 = 19; + +fn main(){ + std::println!("{}", baz!()); +} |