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