@@ -39,8 +39,12 @@ LL | forget(s3);
39
39
| |
40
40
| argument has type `&SomeStruct`
41
41
|
42
- = note: use `let _ = ...` to ignore the expression or result
43
42
= note: `#[warn(forgetting_references)]` on by default
43
+ help: use `let _ = ...` to ignore the expression or result
44
+ |
45
+ LL - forget(s3);
46
+ LL + let _ = s3;
47
+ |
44
48
45
49
warning: calls to `std::mem::forget` with a value that implements `Copy` does nothing
46
50
--> $DIR/forgetting_copy_types.rs:37:5
@@ -64,7 +68,11 @@ LL | forget(s5);
64
68
| |
65
69
| argument has type `&SomeStruct`
66
70
|
67
- = note: use `let _ = ...` to ignore the expression or result
71
+ help: use `let _ = ...` to ignore the expression or result
72
+ |
73
+ LL - forget(s5);
74
+ LL + let _ = s5;
75
+ |
68
76
69
77
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
70
78
--> $DIR/forgetting_copy_types.rs:50:5
@@ -74,7 +82,11 @@ LL | forget(a2);
74
82
| |
75
83
| argument has type `&AnotherStruct`
76
84
|
77
- = note: use `let _ = ...` to ignore the expression or result
85
+ help: use `let _ = ...` to ignore the expression or result
86
+ |
87
+ LL - forget(a2);
88
+ LL + let _ = a2;
89
+ |
78
90
79
91
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
80
92
--> $DIR/forgetting_copy_types.rs:52:5
@@ -84,7 +96,11 @@ LL | forget(a3);
84
96
| |
85
97
| argument has type `&AnotherStruct`
86
98
|
87
- = note: use `let _ = ...` to ignore the expression or result
99
+ help: use `let _ = ...` to ignore the expression or result
100
+ |
101
+ LL - forget(a3);
102
+ LL + let _ = a3;
103
+ |
88
104
89
105
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
90
106
--> $DIR/forgetting_copy_types.rs:53:5
@@ -94,7 +110,11 @@ LL | forget(a4);
94
110
| |
95
111
| argument has type `&AnotherStruct`
96
112
|
97
- = note: use `let _ = ...` to ignore the expression or result
113
+ help: use `let _ = ...` to ignore the expression or result
114
+ |
115
+ LL - forget(a4);
116
+ LL + let _ = a4;
117
+ |
98
118
99
119
warning: 8 warnings emitted
100
120
0 commit comments