2022-09-03 00:39:46 -05:00
|
|
|
error: expected pattern, found `let`
|
|
|
|
--> $DIR/unnecessary-let.rs:2:9
|
|
|
|
|
|
|
|
|
LL | for let x of [1, 2, 3] {}
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the unnecessary `let` keyword
|
|
|
|
|
|
|
|
|
LL - for let x of [1, 2, 3] {}
|
|
|
|
LL + for x of [1, 2, 3] {}
|
|
|
|
|
|
2022-09-03 00:39:46 -05:00
|
|
|
|
|
|
|
error: missing `in` in `for` loop
|
|
|
|
--> $DIR/unnecessary-let.rs:2:15
|
|
|
|
|
|
|
|
|
LL | for let x of [1, 2, 3] {}
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
help: try using `in` here instead
|
|
|
|
|
|
|
|
|
LL | for let x in [1, 2, 3] {}
|
|
|
|
| ~~
|
2022-09-03 00:39:46 -05:00
|
|
|
|
|
|
|
error: expected pattern, found `let`
|
|
|
|
--> $DIR/unnecessary-let.rs:7:9
|
|
|
|
|
|
|
|
|
LL | let 1 => {}
|
2024-07-05 22:07:46 -05:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the unnecessary `let` keyword
|
|
|
|
|
|
|
|
|
LL - let 1 => {}
|
|
|
|
LL + 1 => {}
|
|
|
|
|
|
2022-09-03 00:39:46 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|