@@ -6,7 +6,7 @@ LL | drop(s1);
66 | |
77 | argument has type `SomeStruct`
88 |
9- = note: use `let _ = ... ` to ignore the expression or result
9+ = note: use `let _ = s1 ` to ignore the value instead of dropping directly
1010note: the lint level is defined here
1111 --> $DIR/dropping_copy_types.rs:3:9
1212 |
@@ -21,7 +21,7 @@ LL | drop(s2);
2121 | |
2222 | argument has type `SomeStruct`
2323 |
24- = note: use `let _ = ... ` to ignore the expression or result
24+ = note: use `let _ = s2 ` to ignore the value instead of dropping directly
2525
2626warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
2727 --> $DIR/dropping_copy_types.rs:36:5
@@ -42,7 +42,7 @@ LL | drop(s4);
4242 | |
4343 | argument has type `SomeStruct`
4444 |
45- = note: use `let _ = ... ` to ignore the expression or result
45+ = note: use `let _ = s4 ` to ignore the value instead of dropping directly
4646
4747warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
4848 --> $DIR/dropping_copy_types.rs:38:5
@@ -82,7 +82,7 @@ LL | drop(println_and(13));
8282 | |
8383 | argument has type `i32`
8484 |
85- = note: use `let _ = ... ` to ignore the expression or result
85+ = note: use `let _ = println_and(13) ` to ignore the value instead of dropping directly
8686
8787warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
8888 --> $DIR/dropping_copy_types.rs:74:14
@@ -92,7 +92,7 @@ LL | 3 if drop(println_and(14)) == () => (),
9292 | |
9393 | argument has type `i32`
9494 |
95- = note: use `let _ = ...` to ignore the expression or result
95+ = note: use `let _ = ...` to ignore the value instead of dropping directly
9696
9797warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
9898 --> $DIR/dropping_copy_types.rs:76:14
@@ -102,7 +102,7 @@ LL | 4 => drop(2),
102102 | |
103103 | argument has type `i32`
104104 |
105- = note: use `let _ = ...` to ignore the expression or result
105+ = note: use `let _ = ...` to ignore the value instead of dropping directly
106106
107107warning: 10 warnings emitted
108108
0 commit comments