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.)
I really appreciate the part of
clippy::precedencethat 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::precedencethat flags "mixed usage of bitmasking and bit shifting operators without parentheses", because when you work with bitmasking regularly, it's reasonably well-known thatx | 1 << 10ory & 1 << 10has the precedence you would expect.Could clippy separate these into two separate lints, e.g.
clippy::precedence_arithmetic_vs_bitsandclippy::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.)