diff options
Diffstat (limited to 'src/tools/clippy/src/docs/drop_copy.txt')
-rw-r--r-- | src/tools/clippy/src/docs/drop_copy.txt | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/tools/clippy/src/docs/drop_copy.txt b/src/tools/clippy/src/docs/drop_copy.txt deleted file mode 100644 index f917ca8ed..000000000 --- a/src/tools/clippy/src/docs/drop_copy.txt +++ /dev/null @@ -1,15 +0,0 @@ -### What it does -Checks for calls to `std::mem::drop` with a value -that derives the Copy trait - -### Why is this bad? -Calling `std::mem::drop` [does nothing for types that -implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html), since the -value will be copied and moved into the function on invocation. - -### Example -``` -let x: i32 = 42; // i32 implements Copy -std::mem::drop(x) // A copy of x is passed to the function, leaving the - // original unaffected -```
\ No newline at end of file |