diff options
| author | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2016-03-04 21:01:59 +0100 |
|---|---|---|
| committer | Ulrik Sverdrup <bluss@users.noreply.github.com> | 2016-03-04 21:07:11 +0100 |
| commit | a03222c2b16648c466f836d5eec425fc3c648aa4 (patch) | |
| tree | 238d13ac9cfa9b7f14746bdcc0c2a61b47fd1600 /src/libsyntax/errors | |
| parent | c97524bef9e59a80875110b402b3fc8c139d4d64 (diff) | |
| download | rust-a03222c2b16648c466f836d5eec425fc3c648aa4.tar.gz rust-a03222c2b16648c466f836d5eec425fc3c648aa4.zip | |
Do not trigger unused_assignments for overloaded AssignOps
If `v` were a type with some kind of indirection, so that `v += 1` would have an effect even if `v` were not used anymore, the unused_assignments lint would mark a false positive. This exempts overloaded (non-primitive) assign ops from being treated as assignments (they are method calls). The previous compile-fail tests that ensure x += 1 can trigger for primitive types continue to pass. Added a representative test for the "view" indirection.
Diffstat (limited to 'src/libsyntax/errors')
0 files changed, 0 insertions, 0 deletions
