- Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Description
The precedence lint flags some stuff which is (IMO) unintuitive:
`1 << 2 + 3`
But also some stuff which is (again, IMO) clearer:
`u64::from(data[1]) << 32 | u64::from(data[0])`
The lint does not flag some stuff which is widely understood:
`2 * 3 - 1`
The lint documentation could be more precise about which operator combinations get flagged, with a link to the reference on operator expression precedence.
Further, the lint could be disagglomerated or adjusted to allow the bit-shift with binary-and/or/xor case above.
Version
Additional Labels
No response
Metadata
Metadata
Assignees
Labels
No labels