blob: 81abfbecae073e9864a2fc8e4e8b3fbe83c1106a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
### What it does
Lints for suspicious operations in impls of OpAssign, e.g.
subtracting elements in an AddAssign impl.
### Why is this bad?
This is probably a typo or copy-and-paste error and not intended.
### Example
```
impl AddAssign for Foo {
fn add_assign(&mut self, other: Foo) {
*self = *self - other;
}
}
```
|