@@ -6,7 +6,7 @@ LL | drop(s1);
6
6
| |
7
7
| argument has type `SomeStruct`
8
8
|
9
- = note: use `let _ = ... ` to ignore the expression or result
9
+ = note: use `let _ = s1 ` to ignore the value instead of dropping directly
10
10
note: the lint level is defined here
11
11
--> $DIR/dropping_copy_types.rs:3:9
12
12
|
@@ -21,7 +21,7 @@ LL | drop(s2);
21
21
| |
22
22
| argument has type `SomeStruct`
23
23
|
24
- = note: use `let _ = ... ` to ignore the expression or result
24
+ = note: use `let _ = s2 ` to ignore the value instead of dropping directly
25
25
26
26
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
27
27
--> $DIR/dropping_copy_types.rs:36:5
@@ -42,7 +42,7 @@ LL | drop(s4);
42
42
| |
43
43
| argument has type `SomeStruct`
44
44
|
45
- = note: use `let _ = ... ` to ignore the expression or result
45
+ = note: use `let _ = s4 ` to ignore the value instead of dropping directly
46
46
47
47
warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
48
48
--> $DIR/dropping_copy_types.rs:38:5
@@ -82,7 +82,7 @@ LL | drop(println_and(13));
82
82
| |
83
83
| argument has type `i32`
84
84
|
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
86
86
87
87
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
88
88
--> $DIR/dropping_copy_types.rs:74:14
@@ -92,7 +92,7 @@ LL | 3 if drop(println_and(14)) == () => (),
92
92
| |
93
93
| argument has type `i32`
94
94
|
95
- = note: use `let _ = ...` to ignore the expression or result
95
+ = note: use `let _ = ...` to ignore the value instead of dropping directly
96
96
97
97
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
98
98
--> $DIR/dropping_copy_types.rs:76:14
@@ -102,7 +102,7 @@ LL | 4 => drop(2),
102
102
| |
103
103
| argument has type `i32`
104
104
|
105
- = note: use `let _ = ...` to ignore the expression or result
105
+ = note: use `let _ = ...` to ignore the value instead of dropping directly
106
106
107
107
warning: 10 warnings emitted
108
108
0 commit comments