| 1 |
// Braced macro invocations are not allowed as match arms without a semicolon, |
| 2 |
// even though they are allowed as statements without a semicolon. |
| 3 |
|
| 4 |
macro_rules! m { |
| 5 |
() => { 1 } |
| 6 |
} |
| 7 |
|
| 8 |
fn h(c: bool) { |
| 9 |
match c { |
| 10 |
// { dg-error "failed to parse statement or expression in block expression" "" { target *-*-* } .-1 } |
| 11 |
true => m! {} |
| 12 |
false => () |
| 13 |
// { dg-error "exprwithoutblock requires comma after match case expression in match arm \\(if not final case\\)" "" { target *-*-* } .-1 } |
| 14 |
// { dg-error "unrecognised token .false. for start of item" "" { target *-*-* } .-2 } |
| 15 |
// { dg-error "failed to parse item in crate" "" { target *-*-* } .-3 } |
| 16 |
}; |
| 17 |
} |
| 18 |
|
| 19 |
fn main () {} |