false positive for unused_parens
with binary op if rhs needs parens
#110251
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
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.
I tried this very normal code: link
The current output is the following, but removing any of the parens is an error:
This also gets
cargo fix
ed incorrectly.This need to change to look at the rhs of binops:
rust/compiler/rustc_lint/src/unused.rs
Lines 591 to 601 in 661b33f
@rustbot label T-compiler A-lint A-diagnostics
The text was updated successfully, but these errors were encountered: