aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/macro7.rs
blob: abc48057c5458cc958ad45f4a1b996dac7363cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
fn f() {}

macro_rules! one_or_more {
    ($($a:literal)+) => { // { dg-error "invalid amount of matches for macro invocation" }
        f();
    };
}

fn main() {
    one_or_more!(1 1 1 1 1 1 1 1 1 1 1 "rust" 'c');
    one_or_more!(1);
    one_or_more!(); // { dg-error "Failed to match any rule within macro" }
}