lint useless operands in binary operations #2086
Labels
A-lint
Area: New lints
good-first-issue
These issues are a good way to get started with Clippy
L-unnecessary
Lint: Warn about unnecessary code
T-middle
Type: Probably requires verifiying types
Things like
x & 0
can be just0
. Basically any identity or erasing operation should be linted.x + 0
x * 1
x | 0
x & 0
x & uint_max
x % uint_max
x / uint_max
x / x
x - x
The text was updated successfully, but these errors were encountered: