arithmetic_side_effects not triggered when add_assign
used
#12318
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
Where
foo += 1
would triggerarithmetic_side_effects
, the lint can be silenced by usingfoo.add_assign(1)
.Likely this applies to all of the traits in https://doc.rust-lang.org/std/ops/index.html#traits
Lint Name
arithmetic_side_effects
Reproducer
No response
Version
The text was updated successfully, but these errors were encountered: