rust/tests/ui/expr
Esteban Küber 55e4e3e393 Suggest let or == on typo'd let-chain
When encountering a bare assignment in a let-chain, suggest turning the
assignment into a `let` expression or an equality check.

```
error: expected expression, found `let` statement
  --> $DIR/bad-if-let-suggestion.rs:5:8
   |
LL |     if let x = 1 && i = 2 {}
   |        ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
help: you might have meant to continue the let-chain
   |
LL |     if let x = 1 && let i = 2 {}
   |                     +++
help: you might have meant to compare for equality
   |
LL |     if let x = 1 && i == 2 {}
   |                        +
```
2023-11-28 18:07:52 +00:00
..
compound-assignment Move /src/test to /tests 2023-01-11 09:32:08 +00:00
if Suggest let or == on typo'd let-chain 2023-11-28 18:07:52 +00:00
malformed_closure Show number in error message even for one error 2023-11-24 19:15:52 +01:00
if-bot.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00