aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2225.rs
blob: 4ae40e88aced21fdb18fd0848587d44cadcee743 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
macro_rules! foo {
    ($_:tt) => {};
    () => {foo!($);};
}

macro_rules! bar {
    () => {let $_a = 12;} // { dg-error "expecting .;. but .\\$. found" }
}

pub fn main() -> i32 {
    foo!();
    bar!();
    0
}