Incorrect suggestion to add a semicolon in if let
when trying to borrow a value more than once
#85581
Labels
A-borrow-checker
Area: The borrow checker
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
C-bug
Category: This is a bug.
D-invalid-suggestion
Diagnostics: A structured suggestion resulting in incorrect code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ef9ffeffe1ceaef2201ebc972bfc11cd
The current output is:
Ideally the output should look like:
Without the "help" part, which is what it looks like when I actually add the semicolon (not sure if the rust compiler could also accept this code without an error)
The text was updated successfully, but these errors were encountered: