@@ -35,7 +35,6 @@ impl LoudDropper {
3535}
3636
3737fn should_lint ( ) -> i32 {
38- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
3938 let x = LoudDropper ;
4039 //~^ NOTE: `x` calls a custom destructor
4140 //~| NOTE: `x` will be dropped later since Edition 2024
@@ -48,6 +47,7 @@ fn should_lint() -> i32 {
4847 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
4948 //~| NOTE: for more information, see issue #123739
5049}
50+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
5151
5252fn should_not_lint_closure ( ) -> impl FnOnce ( ) -> i32 {
5353 let x = LoudDropper ;
@@ -60,7 +60,6 @@ fn should_not_lint_closure() -> impl FnOnce() -> i32 {
6060
6161fn should_lint_in_nested_items ( ) {
6262 fn should_lint_me ( ) -> i32 {
63- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
6463 let x = LoudDropper ;
6564 //~^ NOTE: `x` calls a custom destructor
6665 //~| NOTE: `x` will be dropped later since Edition 2024
@@ -73,6 +72,7 @@ fn should_lint_in_nested_items() {
7372 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
7473 //~| NOTE: for more information, see issue #123739
7574 }
75+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
7676}
7777
7878fn should_not_lint_params ( x : LoudDropper ) -> i32 {
@@ -88,7 +88,6 @@ fn should_not_lint() -> i32 {
8888}
8989
9090fn should_lint_in_nested_block ( ) -> i32 {
91- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
9291 let x = LoudDropper ;
9392 //~^ NOTE: `x` calls a custom destructor
9493 //~| NOTE: `x` will be dropped later since Edition 2024
@@ -100,6 +99,7 @@ fn should_lint_in_nested_block() -> i32 {
10099 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
101100 //~| NOTE: for more information, see issue #123739
102101}
102+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
103103
104104fn should_not_lint_in_match_arm ( ) -> i32 {
105105 let x = LoudDropper ;
@@ -134,7 +134,6 @@ fn should_not_lint_when_moved() -> i32 {
134134}
135135
136136fn should_lint_into_async_body ( ) -> i32 {
137- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
138137 async fn f ( ) {
139138 async fn f ( ) { }
140139 let x = LoudDropper ;
@@ -153,9 +152,9 @@ fn should_lint_into_async_body() -> i32 {
153152 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
154153 //~| NOTE: for more information, see issue #123739
155154}
155+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
156156
157157fn should_lint_generics < T : Default > ( ) -> & ' static str {
158- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
159158 fn extract < T > ( _: & T ) -> & ' static str {
160159 todo ! ( )
161160 }
@@ -170,9 +169,9 @@ fn should_lint_generics<T: Default>() -> &'static str {
170169 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
171170 //~| NOTE: for more information, see issue #123739
172171}
172+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
173173
174174fn should_lint_adt ( ) -> i32 {
175- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
176175 let x: Result < LoudDropper , ( ) > = Ok ( LoudDropper ) ;
177176 //~^ NOTE: `x` calls a custom destructor
178177 //~| NOTE: `x` will be dropped later since Edition 2024
@@ -184,14 +183,14 @@ fn should_lint_adt() -> i32 {
184183 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
185184 //~| NOTE: for more information, see issue #123739
186185}
186+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
187187
188188fn should_not_lint_insign_dtor ( ) -> i32 {
189189 let x = String :: new ( ) ;
190190 LoudDropper . get ( )
191191}
192192
193193fn should_lint_with_dtor_span ( ) -> i32 {
194- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
195194 struct LoudDropper3 ;
196195 impl Drop for LoudDropper3 {
197196 //~^ NOTE: `#1` invokes this custom destructor
@@ -228,9 +227,9 @@ fn should_lint_with_dtor_span() -> i32 {
228227 //~| NOTE: most of the time, changing drop order is harmless; inspect the `impl Drop`s for side effects
229228 //~| NOTE: for more information, see issue #123739
230229}
230+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
231231
232232fn should_lint_with_transient_drops ( ) {
233- //~^ NOTE: temporary will be dropped on exiting the block, before the block's local variables
234233 drop ( (
235234 {
236235 LoudDropper . get ( )
@@ -247,6 +246,7 @@ fn should_lint_with_transient_drops() {
247246 //~| NOTE: `_x` will be dropped later since Edition 2024
248247 } ,
249248 ) ) ;
249+ //~^ NOTE: now the temporary value is dropped here, before the local variables in the block or statement
250250}
251251
252252fn main ( ) { }
0 commit comments