]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/drop_forget_copy.stderr
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
[rust.git] / src / tools / clippy / tests / ui / drop_forget_copy.stderr
index 21adb3b3a50432f083dbe8035cae3161815b43b9..90bef1c3c439f76d334e209619d160b5ac0e8ad5 100644 (file)
@@ -72,5 +72,41 @@ note: argument has type `SomeStruct`
 LL |     forget(s4);
    |            ^^
 
-error: aborting due to 6 previous errors
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
+  --> $DIR/drop_forget_copy.rs:80:13
+   |
+LL |             drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
+   |             ^^^^^^^^^^^^^^^^^^^^^
+   |
+note: argument has type `i32`
+  --> $DIR/drop_forget_copy.rs:80:18
+   |
+LL |             drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
+   |                  ^^^^^^^^^^^^^^^
+
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
+  --> $DIR/drop_forget_copy.rs:82:14
+   |
+LL |         3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
+   |              ^^^^^^^^^^^^^^^^^^^^^
+   |
+note: argument has type `i32`
+  --> $DIR/drop_forget_copy.rs:82:19
+   |
+LL |         3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
+   |                   ^^^^^^^^^^^^^^^
+
+error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
+  --> $DIR/drop_forget_copy.rs:83:14
+   |
+LL |         4 => drop(2),                           // Lint, not a fn/method call
+   |              ^^^^^^^
+   |
+note: argument has type `i32`
+  --> $DIR/drop_forget_copy.rs:83:19
+   |
+LL |         4 => drop(2),                           // Lint, not a fn/method call
+   |                   ^
+
+error: aborting due to 9 previous errors