diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/self_assignment.txt | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/tools/clippy/src/docs/self_assignment.txt b/src/tools/clippy/src/docs/self_assignment.txt deleted file mode 100644 index ea60ea077..000000000 --- a/src/tools/clippy/src/docs/self_assignment.txt +++ /dev/null @@ -1,32 +0,0 @@ -### What it does -Checks for explicit self-assignments. - -### Why is this bad? -Self-assignments are redundant and unlikely to be -intentional. - -### Known problems -If expression contains any deref coercions or -indexing operations they are assumed not to have any side effects. - -### Example -``` -struct Event { - x: i32, -} - -fn copy_position(a: &mut Event, b: &Event) { - a.x = a.x; -} -``` - -Should be: -``` -struct Event { - x: i32, -} - -fn copy_position(a: &mut Event, b: &Event) { - a.x = b.x; -} -```
\ No newline at end of file |