diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-16 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2020-08-16 23:31:36 +0200 |
| commit | 4f4abf4e0640edbb1614f3dcb8ff62e8afc54801 (patch) | |
| tree | d44d58b8093ea749dd64d37f188c41a9bc7a9e1c /src/test/codegen/src-hash-algorithm | |
| parent | d1dbf7913ad83954337e94b094f22f1d9d8b83f3 (diff) | |
| download | rust-4f4abf4e0640edbb1614f3dcb8ff62e8afc54801.tar.gz rust-4f4abf4e0640edbb1614f3dcb8ff62e8afc54801.zip | |
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;
}
```
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
