unused_parens
false positive with if let
and ranges
#121070
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
Range expressions have a lower precedence than let expression. e.g.
Not using the parenthesis as suggested
It would be better if
let
expressions just had a lower precedence, but that wouldn't be compatible with the fact the ranges are also lower than&&
and||
. The following:Prints
false..true
.Tested on nightly-2024-02-13
The text was updated successfully, but these errors were encountered: