erasing_op and identity_op should only be triggered for internal #7210
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name:
- erasing_op
- identity_op
I tried this code:
Multiply by 0 is not an erasing operation as the type is changed.
Multiply by 1 is not an identity operation as the type is changed.
I suppose that the lint
erasing_op
may only fire for where0*x
is0
:And for
erasing_op
only where1*x
isx
(1*x
andx
should have the same state): e.g:Meta
cargo clippy -V
: clippy 0.1.54 (881c1ac 2021-05-08)rustc -Vv
:The text was updated successfully, but these errors were encountered: