false-negative unused_parens
in closures consisting of just one expression
#136741
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
L-unused_parens
Lint: unused_parens
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
Note that the code above is really the minimal example, where not having any delimiters could actually be confusing (but one could use braces). What I had initially is a closure inside an iterator combinator, something like this:
Other cases
Rust Version
Anything else?
Also tested on the latest nightly (
rustc 1.86.0-nightly (a9e7b3048 2025-02-07)
)The text was updated successfully, but these errors were encountered: