You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #4892 it was requested that the precedence lint should be disabled for odd functions, but it looks like the fix was implemented incorrectly, as seen in this URLO post. As an example, -1.0_f64.cos().sin()does not trigger the lint, even though cos is not an odd function. Same goes for -1.0_f64.sin().cos() and even for -1.0_f64.cos().cos().
Fix false positive in `PRECEDENCE` lint
Extend the lint to handle chains of methods combined with unary negation.
Closes#5924
changelog: Fix false negative in `PRECEDENCE` lint
In #4892 it was requested that the precedence lint should be disabled for odd functions, but it looks like the fix was implemented incorrectly, as seen in this URLO post. As an example,
-1.0_f64.cos().sin()
does not trigger the lint, even thoughcos
is not an odd function. Same goes for-1.0_f64.sin().cos()
and even for-1.0_f64.cos().cos()
.Clippy version: 0.0.212 (2020-08-17 792c645)
The text was updated successfully, but these errors were encountered: