suspicious_arithmetic_impl and OpAssign #5512
Labels
C-bug
Category: Clippy is not doing the correct thing
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
While the
suspicious_arithmetic_impl
is a bit overeager itself (see #3215), it also fails to detect the type of mistake it is supposed to detect when an Op-trait is implemented in terms of the corresponding OpAssign-trait. In the example below,Add
has "accidentally" been implemented in terms of*=
/MulAssign
, but clippy 0.0.212 (4ee1206 2020-02-01) does not issue a warning:The text was updated successfully, but these errors were encountered: