@@ -35,7 +35,6 @@ impl LoudDropper {
35
35
}
36
36
37
37
fn should_lint ( ) -> i32 {
38
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
39
38
let x = LoudDropper ;
40
39
//~^ NOTE: `x` calls a custom destructor
41
40
//~| NOTE: `x` will be dropped later since Edition 2024
@@ -48,6 +47,7 @@ fn should_lint() -> i32 {
48
47
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
49
48
//~| NOTE: for more information, see issue #123739
50
49
}
50
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
51
51
52
52
fn should_not_lint_closure ( ) -> impl FnOnce ( ) -> i32 {
53
53
let x = LoudDropper ;
@@ -60,7 +60,6 @@ fn should_not_lint_closure() -> impl FnOnce() -> i32 {
60
60
61
61
fn should_lint_in_nested_items ( ) {
62
62
fn should_lint_me ( ) -> i32 {
63
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
64
63
let x = LoudDropper ;
65
64
//~^ NOTE: `x` calls a custom destructor
66
65
//~| NOTE: `x` will be dropped later since Edition 2024
@@ -73,6 +72,7 @@ fn should_lint_in_nested_items() {
73
72
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
74
73
//~| NOTE: for more information, see issue #123739
75
74
}
75
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
76
76
}
77
77
78
78
fn should_not_lint_params ( x : LoudDropper ) -> i32 {
@@ -88,7 +88,6 @@ fn should_not_lint() -> i32 {
88
88
}
89
89
90
90
fn should_lint_in_nested_block ( ) -> i32 {
91
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
92
91
let x = LoudDropper ;
93
92
//~^ NOTE: `x` calls a custom destructor
94
93
//~| NOTE: `x` will be dropped later since Edition 2024
@@ -100,6 +99,7 @@ fn should_lint_in_nested_block() -> i32 {
100
99
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
101
100
//~| NOTE: for more information, see issue #123739
102
101
}
102
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
103
103
104
104
fn should_not_lint_in_match_arm ( ) -> i32 {
105
105
let x = LoudDropper ;
@@ -134,7 +134,6 @@ fn should_not_lint_when_moved() -> i32 {
134
134
}
135
135
136
136
fn should_lint_into_async_body ( ) -> i32 {
137
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
138
137
async fn f ( ) {
139
138
async fn f ( ) { }
140
139
let x = LoudDropper ;
@@ -153,9 +152,9 @@ fn should_lint_into_async_body() -> i32 {
153
152
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
154
153
//~| NOTE: for more information, see issue #123739
155
154
}
155
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
156
156
157
157
fn should_lint_generics < T : Default > ( ) -> & ' static str {
158
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
159
158
fn extract < T > ( _: & T ) -> & ' static str {
160
159
todo ! ( )
161
160
}
@@ -170,9 +169,9 @@ fn should_lint_generics<T: Default>() -> &'static str {
170
169
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
171
170
//~| NOTE: for more information, see issue #123739
172
171
}
172
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
173
173
174
174
fn should_lint_adt ( ) -> i32 {
175
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
176
175
let x: Result < LoudDropper , ( ) > = Ok ( LoudDropper ) ;
177
176
//~^ NOTE: `x` calls a custom destructor
178
177
//~| NOTE: `x` will be dropped later since Edition 2024
@@ -184,14 +183,14 @@ fn should_lint_adt() -> i32 {
184
183
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
185
184
//~| NOTE: for more information, see issue #123739
186
185
}
186
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
187
187
188
188
fn should_not_lint_insign_dtor ( ) -> i32 {
189
189
let x = String :: new ( ) ;
190
190
LoudDropper . get ( )
191
191
}
192
192
193
193
fn should_lint_with_dtor_span ( ) -> i32 {
194
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
195
194
struct LoudDropper3 ;
196
195
impl Drop for LoudDropper3 {
197
196
//~^ NOTE: `#1` invokes this custom destructor
@@ -228,9 +227,9 @@ fn should_lint_with_dtor_span() -> i32 {
228
227
//~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
229
228
//~| NOTE: for more information, see issue #123739
230
229
}
230
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
231
231
232
232
fn should_lint_with_transient_drops ( ) {
233
- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
234
233
drop ( (
235
234
{
236
235
LoudDropper . get ( )
@@ -247,6 +246,7 @@ fn should_lint_with_transient_drops() {
247
246
//~| NOTE: `_x` will be dropped later since Edition 2024
248
247
} ,
249
248
) ) ;
249
+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
250
250
}
251
251
252
252
fn main ( ) { }
0 commit comments