diagnostics: better warning in case of let declaration and assignment operator: let y += 4 #54143
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
this code compiles fine, but if I try to use something like let y += 4; rustc has no idea what is going on:
I wonder if we could figure out that the user wants
let y = y + 4
in this case and suggest it?The text was updated successfully, but these errors were encountered: