]> git.lizzy.rs Git - rust.git/blob - tests/ui/proc-macro/dollar-crate-issue-101211.rs
Rollup merge of #106591 - Ezrashaw:attempted-integer-identifer, r=Estebank
[rust.git] / tests / ui / proc-macro / dollar-crate-issue-101211.rs
1 // check-pass
2 // edition:2021
3 // aux-build:test-macros.rs
4
5 #![no_std] // Don't load unnecessary hygiene information from std
6 extern crate std;
7
8 #[macro_use]
9 extern crate test_macros;
10
11 macro_rules! foo {
12     ($($path:ident)::*) => (
13         test_macros::recollect!(
14             $($path)::*
15         )
16     )
17 }
18
19 macro_rules! baz {
20     () => (
21         foo!($crate::BAR)
22     )
23 }
24
25 pub const BAR: u32 = 19;
26
27 fn main(){
28     std::println!("{}", baz!());
29 }