rust/tests/ui/parser/recover/recover-parens-around-match-arm-head.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
271 B
Rust
Raw Normal View History

2023-11-06 17:48:58 -06:00
//@ run-rustfix
fn main() {
let val = 42;
let x = match val {
(0 if true) => {
//~^ ERROR unexpected parentheses surrounding `match` arm pattern
42u8
}
_ => 0u8,
};
let _y: u32 = x; //~ ERROR mismatched types
2023-11-06 13:56:45 -06:00
}