aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/macro18.rs
blob: 5418725b619cd0e708fc2f24d935e8c7ad83e4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-additional-options "-w" }

macro_rules! take_stmt {
    ($s:stmt) => {
        $s;
    };
}

fn main() -> i32 {
    take_stmt!(let complete = 15;); // { dg-error "Failed to match any rule within macro" }
    take_stmt!(let lacking = 14);

    0
}