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

macro_rules! one_or_more {
    ($($a:literal)+) => {
        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" }
}