aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/macros/mbe/macro6.rs
blob: bbaaa25eb52c2cb0a8d80ec56d7b76564f545582 (plain)
1
2
3
4
5
6
7
8
9
10
11
macro_rules! zero_or_one {
    ($($a:literal)?) => {
        1 + 2;
    }
}

fn main() {
    zero_or_one!();
    zero_or_one!(14);
    zero_or_one!(125 12 "gcc"); // { dg-error "Failed to match any rule within macro" }
}