1- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
2- --> $DIR/drop_forget_copy.rs:33:5
3- |
4- LL | drop(s1);
5- | ^^^^^^^^
6- |
7- note: argument has type `SomeStruct`
8- --> $DIR/drop_forget_copy.rs:33:10
9- |
10- LL | drop(s1);
11- | ^^
12- = note: `-D clippy::drop-copy` implied by `-D warnings`
13-
14- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
15- --> $DIR/drop_forget_copy.rs:34:5
16- |
17- LL | drop(s2);
18- | ^^^^^^^^
19- |
20- note: argument has type `SomeStruct`
21- --> $DIR/drop_forget_copy.rs:34:10
22- |
23- LL | drop(s2);
24- | ^^
25-
26- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
27- --> $DIR/drop_forget_copy.rs:36:5
28- |
29- LL | drop(s4);
30- | ^^^^^^^^
31- |
32- note: argument has type `SomeStruct`
33- --> $DIR/drop_forget_copy.rs:36:10
34- |
35- LL | drop(s4);
36- | ^^
37-
381error: calls to `std::mem::forget` with a value that implements `Copy`. Forgetting a copy leaves the original intact
392 --> $DIR/drop_forget_copy.rs:39:5
403 |
@@ -72,7 +35,44 @@ note: argument has type `SomeStruct`
7235LL | forget(s4);
7336 | ^^
7437
75- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
38+ error: calls to `std::mem::drop` with a value that implements `Copy`.
39+ --> $DIR/drop_forget_copy.rs:33:5
40+ |
41+ LL | drop(s1);
42+ | ^^^^^^^^
43+ |
44+ note: argument has type `SomeStruct`
45+ --> $DIR/drop_forget_copy.rs:33:10
46+ |
47+ LL | drop(s1);
48+ | ^^
49+ = note: `-D drop-copy` implied by `-D warnings`
50+
51+ error: calls to `std::mem::drop` with a value that implements `Copy`.
52+ --> $DIR/drop_forget_copy.rs:34:5
53+ |
54+ LL | drop(s2);
55+ | ^^^^^^^^
56+ |
57+ note: argument has type `SomeStruct`
58+ --> $DIR/drop_forget_copy.rs:34:10
59+ |
60+ LL | drop(s2);
61+ | ^^
62+
63+ error: calls to `std::mem::drop` with a value that implements `Copy`.
64+ --> $DIR/drop_forget_copy.rs:36:5
65+ |
66+ LL | drop(s4);
67+ | ^^^^^^^^
68+ |
69+ note: argument has type `SomeStruct`
70+ --> $DIR/drop_forget_copy.rs:36:10
71+ |
72+ LL | drop(s4);
73+ | ^^
74+
75+ error: calls to `std::mem::drop` with a value that implements `Copy`.
7676 --> $DIR/drop_forget_copy.rs:80:13
7777 |
7878LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
@@ -84,7 +84,7 @@ note: argument has type `i32`
8484LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
8585 | ^^^^^^^^^^^^^^^
8686
87- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
87+ error: calls to `std::mem::drop` with a value that implements `Copy`.
8888 --> $DIR/drop_forget_copy.rs:82:14
8989 |
9090LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
@@ -96,7 +96,7 @@ note: argument has type `i32`
9696LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
9797 | ^^^^^^^^^^^^^^^
9898
99- error: calls to `std::mem::drop` with a value that implements `Copy`. Dropping a copy leaves the original intact
99+ error: calls to `std::mem::drop` with a value that implements `Copy`.
100100 --> $DIR/drop_forget_copy.rs:83:14
101101 |
102102LL | 4 => drop(2), // Lint, not a fn/method call
0 commit comments