@@ -2,13 +2,10 @@ warning: calls to `std::mem::drop` with a value that implements `Copy`.
22 --> $DIR/drop_copy.rs:34:5
33 |
44LL | drop(s1);
5- | ^^^^^^^^
5+ | ^^^^^--^
6+ | |
7+ | argument has type `SomeStruct`
68 |
7- note: argument has type `SomeStruct`
8- --> $DIR/drop_copy.rs:34:10
9- |
10- LL | drop(s1);
11- | ^^
129note: the lint level is defined here
1310 --> $DIR/drop_copy.rs:3:9
1411 |
@@ -19,110 +16,75 @@ warning: calls to `std::mem::drop` with a value that implements `Copy`.
1916 --> $DIR/drop_copy.rs:35:5
2017 |
2118LL | drop(s2);
22- | ^^^^^^^^
23- |
24- note: argument has type `SomeStruct`
25- --> $DIR/drop_copy.rs:35:10
26- |
27- LL | drop(s2);
28- | ^^
19+ | ^^^^^--^
20+ | |
21+ | argument has type `SomeStruct`
2922
3023warning: calls to `std::mem::drop` with a reference instead of an owned value
3124 --> $DIR/drop_copy.rs:36:5
3225 |
3326LL | drop(s3);
34- | ^^^^^^^^
35- |
36- note: argument has type `&SomeStruct`
37- --> $DIR/drop_copy.rs:36:10
27+ | ^^^^^--^
28+ | |
29+ | argument has type `&SomeStruct`
3830 |
39- LL | drop(s3);
40- | ^^
4131 = note: `#[warn(drop_ref)]` on by default
4232
4333warning: calls to `std::mem::drop` with a value that implements `Copy`.
4434 --> $DIR/drop_copy.rs:37:5
4535 |
4636LL | drop(s4);
47- | ^^^^^^^^
48- |
49- note: argument has type `SomeStruct`
50- --> $DIR/drop_copy.rs:37:10
51- |
52- LL | drop(s4);
53- | ^^
37+ | ^^^^^--^
38+ | |
39+ | argument has type `SomeStruct`
5440
5541warning: calls to `std::mem::drop` with a reference instead of an owned value
5642 --> $DIR/drop_copy.rs:38:5
5743 |
5844LL | drop(s5);
59- | ^^^^^^^^
60- |
61- note: argument has type `&SomeStruct`
62- --> $DIR/drop_copy.rs:38:10
63- |
64- LL | drop(s5);
65- | ^^
45+ | ^^^^^--^
46+ | |
47+ | argument has type `&SomeStruct`
6648
6749warning: calls to `std::mem::drop` with a reference instead of an owned value
6850 --> $DIR/drop_copy.rs:50:5
6951 |
7052LL | drop(a2);
71- | ^^^^^^^^
72- |
73- note: argument has type `&AnotherStruct`
74- --> $DIR/drop_copy.rs:50:10
75- |
76- LL | drop(a2);
77- | ^^
53+ | ^^^^^--^
54+ | |
55+ | argument has type `&AnotherStruct`
7856
7957warning: calls to `std::mem::drop` with a reference instead of an owned value
8058 --> $DIR/drop_copy.rs:52:5
8159 |
8260LL | drop(a4);
83- | ^^^^^^^^
84- |
85- note: argument has type `&AnotherStruct`
86- --> $DIR/drop_copy.rs:52:10
87- |
88- LL | drop(a4);
89- | ^^
61+ | ^^^^^--^
62+ | |
63+ | argument has type `&AnotherStruct`
9064
9165warning: calls to `std::mem::drop` with a value that implements `Copy`.
9266 --> $DIR/drop_copy.rs:71:13
9367 |
9468LL | drop(println_and(13));
95- | ^^^^^^^^^^^^^^^^^^^^^
96- |
97- note: argument has type `i32`
98- --> $DIR/drop_copy.rs:71:18
99- |
100- LL | drop(println_and(13));
101- | ^^^^^^^^^^^^^^^
69+ | ^^^^^---------------^
70+ | |
71+ | argument has type `i32`
10272
10373warning: calls to `std::mem::drop` with a value that implements `Copy`.
10474 --> $DIR/drop_copy.rs:74:14
10575 |
10676LL | 3 if drop(println_and(14)) == () => (),
107- | ^^^^^^^^^^^^^^^^^^^^^
108- |
109- note: argument has type `i32`
110- --> $DIR/drop_copy.rs:74:19
111- |
112- LL | 3 if drop(println_and(14)) == () => (),
113- | ^^^^^^^^^^^^^^^
77+ | ^^^^^---------------^
78+ | |
79+ | argument has type `i32`
11480
11581warning: calls to `std::mem::drop` with a value that implements `Copy`.
11682 --> $DIR/drop_copy.rs:76:14
11783 |
11884LL | 4 => drop(2),
119- | ^^^^^^^
120- |
121- note: argument has type `i32`
122- --> $DIR/drop_copy.rs:76:19
123- |
124- LL | 4 => drop(2),
125- | ^
85+ | ^^^^^-^
86+ | |
87+ | argument has type `i32`
12688
12789warning: 10 warnings emitted
12890
0 commit comments