rust/compiler/rustc_parse/src
Matthias Krüger aab61d0b9a
Rollup merge of #118191 - estebank:let-chain-typo, r=compiler-errors
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-29 12:34:48 +01:00
..
lexer Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
parser Rollup merge of #118191 - estebank:let-chain-typo, r=compiler-errors 2023-11-29 12:34:48 +01:00
errors.rs Rollup merge of #118191 - estebank:let-chain-typo, r=compiler-errors 2023-11-29 12:34:48 +01:00
lib.rs Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
validate_attr.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00