1
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
1
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
2
2
--> $DIR/drop_forget_copy.rs:33:5
3
3
|
4
4
LL | drop(s1);
@@ -9,9 +9,9 @@ note: argument has type `SomeStruct`
9
9
|
10
10
LL | drop(s1);
11
11
| ^^
12
- = note: `-D clippy::drop-copy ` implied by `-D warnings`
12
+ = note: `-D clippy::drop-non-drop ` implied by `-D warnings`
13
13
14
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
14
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
15
15
--> $DIR/drop_forget_copy.rs:34:5
16
16
|
17
17
LL | drop(s2);
@@ -23,7 +23,7 @@ note: argument has type `SomeStruct`
23
23
LL | drop(s2);
24
24
| ^^
25
25
26
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
26
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
27
27
--> $DIR/drop_forget_copy.rs:35:5
28
28
|
29
29
LL | drop(s3);
@@ -35,7 +35,7 @@ note: argument has type `&SomeStruct`
35
35
LL | drop(s3);
36
36
| ^^
37
37
38
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
38
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
39
39
--> $DIR/drop_forget_copy.rs:36:5
40
40
|
41
41
LL | drop(s4);
@@ -47,7 +47,7 @@ note: argument has type `SomeStruct`
47
47
LL | drop(s4);
48
48
| ^^
49
49
50
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
50
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
51
51
--> $DIR/drop_forget_copy.rs:37:5
52
52
|
53
53
LL | drop(s5);
@@ -96,7 +96,7 @@ note: argument has type `SomeStruct`
96
96
LL | forget(s4);
97
97
| ^^
98
98
99
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
99
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
100
100
--> $DIR/drop_forget_copy.rs:55:5
101
101
|
102
102
LL | drop(a2);
@@ -108,7 +108,7 @@ note: argument has type `&AnotherStruct`
108
108
LL | drop(a2);
109
109
| ^^
110
110
111
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
111
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
112
112
--> $DIR/drop_forget_copy.rs:57:5
113
113
|
114
114
LL | drop(a4);
@@ -120,7 +120,7 @@ note: argument has type `&AnotherStruct`
120
120
LL | drop(a4);
121
121
| ^^
122
122
123
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
123
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
124
124
--> $DIR/drop_forget_copy.rs:80:13
125
125
|
126
126
LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
@@ -132,7 +132,7 @@ note: argument has type `i32`
132
132
LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
133
133
| ^^^^^^^^^^^^^^^
134
134
135
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
135
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
136
136
--> $DIR/drop_forget_copy.rs:82:14
137
137
|
138
138
LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
@@ -144,7 +144,7 @@ note: argument has type `i32`
144
144
LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
145
145
| ^^^^^^^^^^^^^^^
146
146
147
- error: calls to `std::mem::drop` with a value that implements `Copy `. Dropping a copy leaves the original intact
147
+ error: call to `std::mem::drop` with a value that does not implement `Drop `. Dropping such a type only extends its contained lifetimes
148
148
--> $DIR/drop_forget_copy.rs:83:14
149
149
|
150
150
LL | 4 => drop(2), // Lint, not a fn/method call
@@ -156,5 +156,78 @@ note: argument has type `i32`
156
156
LL | 4 => drop(2), // Lint, not a fn/method call
157
157
| ^
158
158
159
- error: aborting due to 13 previous errors
159
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
160
+ --> $DIR/drop_forget_copy.rs:33:5
161
+ |
162
+ LL | drop(s1);
163
+ | ^^^^^^^^
164
+ |
165
+ note: argument has type `SomeStruct`
166
+ --> $DIR/drop_forget_copy.rs:33:10
167
+ |
168
+ LL | drop(s1);
169
+ | ^^
170
+ = note: `-D drop-copy` implied by `-D warnings`
171
+
172
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
173
+ --> $DIR/drop_forget_copy.rs:34:5
174
+ |
175
+ LL | drop(s2);
176
+ | ^^^^^^^^
177
+ |
178
+ note: argument has type `SomeStruct`
179
+ --> $DIR/drop_forget_copy.rs:34:10
180
+ |
181
+ LL | drop(s2);
182
+ | ^^
183
+
184
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
185
+ --> $DIR/drop_forget_copy.rs:36:5
186
+ |
187
+ LL | drop(s4);
188
+ | ^^^^^^^^
189
+ |
190
+ note: argument has type `SomeStruct`
191
+ --> $DIR/drop_forget_copy.rs:36:10
192
+ |
193
+ LL | drop(s4);
194
+ | ^^
195
+
196
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
197
+ --> $DIR/drop_forget_copy.rs:80:13
198
+ |
199
+ LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
200
+ | ^^^^^^^^^^^^^^^^^^^^^
201
+ |
202
+ note: argument has type `i32`
203
+ --> $DIR/drop_forget_copy.rs:80:18
204
+ |
205
+ LL | drop(println_and(13)); // Lint, even if we only care about the side-effect, it's already in a block
206
+ | ^^^^^^^^^^^^^^^
207
+
208
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
209
+ --> $DIR/drop_forget_copy.rs:82:14
210
+ |
211
+ LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
212
+ | ^^^^^^^^^^^^^^^^^^^^^
213
+ |
214
+ note: argument has type `i32`
215
+ --> $DIR/drop_forget_copy.rs:82:19
216
+ |
217
+ LL | 3 if drop(println_and(14)) == () => (), // Lint, idiomatic use is only in body of `Arm`
218
+ | ^^^^^^^^^^^^^^^
219
+
220
+ error: calls to `std::mem::drop` with a value that implements `Copy`.
221
+ --> $DIR/drop_forget_copy.rs:83:14
222
+ |
223
+ LL | 4 => drop(2), // Lint, not a fn/method call
224
+ | ^^^^^^^
225
+ |
226
+ note: argument has type `i32`
227
+ --> $DIR/drop_forget_copy.rs:83:19
228
+ |
229
+ LL | 4 => drop(2), // Lint, not a fn/method call
230
+ | ^
231
+
232
+ error: aborting due to 19 previous errors
160
233
0 commit comments