Commit graph

1 commit

Author SHA1 Message Date
Tomasz Miąsko
4f4abf4e06 Warn about explicit self-assignment
Warn about assignments where left-hand side place expression is the same
as right-hand side value expression. For example, warn about assignment in:

```rust
pub struct Event {
    id: usize,
    x: i32,
    y: i32,
}

pub fn copy_position(a: &mut Event, b: &Event) {
    a.x = b.x;
    a.y = a.y;
}
```
2020-08-16 23:31:36 +02:00