@@ -431,13 +431,13 @@ impl DropTree {
431
431
cfg. terminate ( block, drop_node. data . source_info , terminator) ;
432
432
}
433
433
DropKind :: ForLint => {
434
- let stmt = Statement {
435
- source_info : drop_node. data . source_info ,
436
- kind : StatementKind :: BackwardIncompatibleDropHint {
434
+ let stmt = Statement :: new (
435
+ drop_node. data . source_info ,
436
+ StatementKind :: BackwardIncompatibleDropHint {
437
437
place : Box :: new ( drop_node. data . local . into ( ) ) ,
438
438
reason : BackwardIncompatibleDropReason :: Edition2024 ,
439
439
} ,
440
- } ;
440
+ ) ;
441
441
cfg. push ( block, stmt) ;
442
442
let target = blocks[ drop_node. next ] . unwrap ( ) ;
443
443
if target != block {
@@ -454,10 +454,10 @@ impl DropTree {
454
454
// Root nodes don't correspond to a drop.
455
455
DropKind :: Storage if drop_idx == ROOT_NODE => { }
456
456
DropKind :: Storage => {
457
- let stmt = Statement {
458
- source_info : drop_node. data . source_info ,
459
- kind : StatementKind :: StorageDead ( drop_node. data . local ) ,
460
- } ;
457
+ let stmt = Statement :: new (
458
+ drop_node. data . source_info ,
459
+ StatementKind :: StorageDead ( drop_node. data . local ) ,
460
+ ) ;
461
461
cfg. push ( block, stmt) ;
462
462
let target = blocks[ drop_node. next ] . unwrap ( ) ;
463
463
if target != block {
@@ -1124,21 +1124,21 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
1124
1124
DropKind :: ForLint => {
1125
1125
self . cfg . push (
1126
1126
block,
1127
- Statement {
1127
+ Statement :: new (
1128
1128
source_info,
1129
- kind : StatementKind :: BackwardIncompatibleDropHint {
1129
+ StatementKind :: BackwardIncompatibleDropHint {
1130
1130
place : Box :: new ( local. into ( ) ) ,
1131
1131
reason : BackwardIncompatibleDropReason :: Edition2024 ,
1132
1132
} ,
1133
- } ,
1133
+ ) ,
1134
1134
) ;
1135
1135
}
1136
1136
DropKind :: Storage => {
1137
1137
// Only temps and vars need their storage dead.
1138
1138
assert ! ( local. index( ) > self . arg_count) ;
1139
1139
self . cfg . push (
1140
1140
block,
1141
- Statement { source_info, kind : StatementKind :: StorageDead ( local) } ,
1141
+ Statement :: new ( source_info, StatementKind :: StorageDead ( local) ) ,
1142
1142
) ;
1143
1143
}
1144
1144
}
@@ -1880,13 +1880,13 @@ where
1880
1880
1881
1881
cfg. push (
1882
1882
block,
1883
- Statement {
1883
+ Statement :: new (
1884
1884
source_info,
1885
- kind : StatementKind :: BackwardIncompatibleDropHint {
1885
+ StatementKind :: BackwardIncompatibleDropHint {
1886
1886
place : Box :: new ( local. into ( ) ) ,
1887
1887
reason : BackwardIncompatibleDropReason :: Edition2024 ,
1888
1888
} ,
1889
- } ,
1889
+ ) ,
1890
1890
) ;
1891
1891
}
1892
1892
DropKind :: Storage => {
@@ -1910,7 +1910,7 @@ where
1910
1910
}
1911
1911
// Only temps and vars need their storage dead.
1912
1912
assert ! ( local. index( ) > arg_count) ;
1913
- cfg. push ( block, Statement { source_info, kind : StatementKind :: StorageDead ( local) } ) ;
1913
+ cfg. push ( block, Statement :: new ( source_info, StatementKind :: StorageDead ( local) ) ) ;
1914
1914
}
1915
1915
}
1916
1916
}
0 commit comments