summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/dollar-crate-issue-101211.rs
blob: fc1acfd32d2fc40a1a0e31094c47aa96e50994a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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!());
}