rustc/tests/ui/parser/unnecessary-let.rs
2025-01-11 15:57:26 +01:00

14 lines
255 B
Rust

//@ run-rustfix
fn main() {
for let _x of [1, 2, 3] {}
//~^ ERROR expected pattern, found `let`
//~| ERROR missing `in` in `for` loop
match 1 {
let 1 => {}
//~^ ERROR expected pattern, found `let`
_ => {}
}
}