Skip to content

Commit 5727331

Browse files
Rollup merge of #101677 - winxpqq955:issue-101211, r=fee1-dead
Add test for #101211 Closes #101211
2 parents 7fc3183 + 2126622 commit 5727331

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)