aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/braced_macro_arm.rs
blob: 8782cf9f94f82138e5bb188c1766bf349f87554e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Braced macro invocations are not allowed as match arms without a semicolon,
// even though they are allowed as statements without a semicolon.

macro_rules! m {
    () => { 1 }
}

fn h(c: bool) {
    match c {
        true => m! {}
        false => ()
        // { dg-error "exprwithoutblock requires comma after match case expression in match arm \\(if not final case\\)" "" { target *-*-* } .-1 }
    };
}

fn main () {}