mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
65fcd87abd
Fix incorrect `let` to `const` suggestion for pattern bindings
When a variable from a pattern binding was referenced inside a `const {}` block, the compiler incorrectly suggested replacing `let` with `const`. This was reported in rust-lang/rust#152831 for `if let`, but also applies to `while let` and `let ... else`.