rust/tests/ui/proc-macro/dollar-crate-issue-101211.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
449 B
Rust
Raw Normal View History

2022-09-11 02:09:39 -05:00
//@ 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!());
}