move
recommendation with closure and invalid lifetime is inserted at the wrong place
#113087
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
move
should not be recommended as it does not solve any issue. This is the case even if put at the closure definition since the closure does not capture anything.Rationale and extra context
The recommendation for the
move
is wrong.Other cases
No response
Anything else?
Playground link.
Rust version:
The text was updated successfully, but these errors were encountered: