@@ -11,7 +11,7 @@ note: the lint level is defined here
1111 |
1212LL | #![warn(dropping_copy_types)]
1313 | ^^^^^^^^^^^^^^^^^^^
14- help: use `let _ = ...` to ignore the expression or result
14+ help: use `let _ = s1` simply to ignore the expression or result
1515 |
1616LL - drop(s1);
1717LL + let _ = s1;
@@ -25,13 +25,13 @@ LL | drop(s2);
2525 | |
2626 | argument has type `SomeStruct`
2727 |
28- help: use `let _ = ...` to ignore the expression or result
28+ help: use `let _ = s2` simply to ignore the expression or result
2929 |
3030LL - drop(s2);
3131LL + let _ = s2;
3232 |
3333
34- warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
34+ warning: calls to `std::mem::drop` with a reference does not drop the underline value
3535 --> $DIR/dropping_copy_types.rs:36:5
3636 |
3737LL | drop(s3);
@@ -40,7 +40,7 @@ LL | drop(s3);
4040 | argument has type `&SomeStruct`
4141 |
4242 = note: `#[warn(dropping_references)]` on by default
43- help: use `let _ = ...` to ignore the expression or result
43+ help: use `let _ = s3` simply to ignore the expression or result
4444 |
4545LL - drop(s3);
4646LL + let _ = s3;
@@ -54,49 +54,49 @@ LL | drop(s4);
5454 | |
5555 | argument has type `SomeStruct`
5656 |
57- help: use `let _ = ...` to ignore the expression or result
57+ help: use `let _ = s4` simply to ignore the expression or result
5858 |
5959LL - drop(s4);
6060LL + let _ = s4;
6161 |
6262
63- warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
63+ warning: calls to `std::mem::drop` with a reference does not drop the underline value
6464 --> $DIR/dropping_copy_types.rs:38:5
6565 |
6666LL | drop(s5);
6767 | ^^^^^--^
6868 | |
6969 | argument has type `&SomeStruct`
7070 |
71- help: use `let _ = ...` to ignore the expression or result
71+ help: use `let _ = s5` simply to ignore the expression or result
7272 |
7373LL - drop(s5);
7474LL + let _ = s5;
7575 |
7676
77- warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
77+ warning: calls to `std::mem::drop` with a reference does not drop the underline value
7878 --> $DIR/dropping_copy_types.rs:50:5
7979 |
8080LL | drop(a2);
8181 | ^^^^^--^
8282 | |
8383 | argument has type `&AnotherStruct`
8484 |
85- help: use `let _ = ...` to ignore the expression or result
85+ help: use `let _ = a2` simply to ignore the expression or result
8686 |
8787LL - drop(a2);
8888LL + let _ = a2;
8989 |
9090
91- warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
91+ warning: calls to `std::mem::drop` with a reference does not drop the underline value
9292 --> $DIR/dropping_copy_types.rs:52:5
9393 |
9494LL | drop(a4);
9595 | ^^^^^--^
9696 | |
9797 | argument has type `&AnotherStruct`
9898 |
99- help: use `let _ = ...` to ignore the expression or result
99+ help: use `let _ = a4` simply to ignore the expression or result
100100 |
101101LL - drop(a4);
102102LL + let _ = a4;
@@ -110,7 +110,7 @@ LL | drop(println_and(13));
110110 | |
111111 | argument has type `i32`
112112 |
113- help: use `let _ = ...` to ignore the expression or result
113+ help: use `let _ = println_and(13)` simply to ignore the expression or result
114114 |
115115LL - drop(println_and(13));
116116LL + let _ = println_and(13);
@@ -124,7 +124,7 @@ LL | 3 if drop(println_and(14)) == () => (),
124124 | |
125125 | argument has type `i32`
126126 |
127- = note: use `let _ = ...` to ignore the expression or result
127+ = note: use `let _ = println_and(14)` simply to ignore the expression or result
128128
129129warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
130130 --> $DIR/dropping_copy_types.rs:76:14
@@ -134,7 +134,7 @@ LL | 4 => drop(2),
134134 | |
135135 | argument has type `i32`
136136 |
137- = note: use `let _ = ...` to ignore the expression or result
137+ = note: use `let _ = 2` simply to ignore the expression or result
138138
139139warning: 10 warnings emitted
140140
0 commit comments