summaryrefslogtreecommitdiffstats
path: root/tests/ui/hygiene/issue-40847.rs
blob: 087b40ad6cdf72fc4a7b892af17395560410693a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
macro_rules! gen {
    ($name:ident ( $($dol:tt $var:ident)* ) $($body:tt)*) => {
        macro_rules! $name {
            ($($dol $var:ident)*) => {
                $($body)*
            }
        }
    }
}

gen!(m($var) $var);

fn main() {
    let x = 1;
    assert_eq!(m!(x), 1);
}