unused_assignment
triggered by closure even though value is used
#141615
Labels
A-closures
Area: Closures (`|…| { … }`)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
D-imprecise-spans
Diagnostics: spans don't point to exactly the erroneous code
L-unused_assignments
Lint: unused_assignments
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
Code
Current output
Desired output
Rationale and extra context
No response
Other cases
If the initial value is used, then the warning goes away, suggesting that it should warn on that instead:
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: