mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
13 lines
270 B
Rust
13 lines
270 B
Rust
// 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
|
|
}
|