Skip to content

Commit 2126622

Browse files
committed
Add test for #101211
1 parent 781ef3e commit 2126622

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
}

0 commit comments

Comments
 (0)