-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
I really appreciate the part of clippy::precedence
that flags "mixed usage of arithmetic and bit shifting/combining operators without parentheses" (e.g. 1 << 2 + 3
).
I would rather not have the part of clippy::precedence
that flags "mixed usage of bitmasking and bit shifting operators without parentheses", because when you work with bitmasking regularly, it's reasonably well-known that x | 1 << 10
or y & 1 << 10
has the precedence you would expect.
Could clippy separate these into two separate lints, e.g. clippy::precedence_arithmetic_vs_bits
and clippy::precedence_bits
?
(I would also make the case that the latter should be allow-by-default, but for this issue I'm just requesting that the two be split.)
samueltardieu, kadiwa4 and Bromeon
Metadata
Metadata
Assignees
Labels
No labels