Rollup merge of #101677 - winxpqq955:issue-101211, r=fee1-dead

Add test for #101211

Closes #101211
This commit is contained in:
Guillaume Gomez 2022-09-12 22:47:14 +02:00 committed by GitHub
commit 57273313ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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!());
}