@@ -411,13 +411,13 @@ impl DropTree {
411
411
cfg. terminate ( block, drop_node. data . source_info , terminator) ;
412
412
}
413
413
DropKind :: ForLint => {
414
- let stmt = Statement {
415
- source_info : drop_node. data . source_info ,
416
- kind : StatementKind :: BackwardIncompatibleDropHint {
414
+ let stmt = Statement :: new (
415
+ drop_node. data . source_info ,
416
+ StatementKind :: BackwardIncompatibleDropHint {
417
417
place : Box :: new ( drop_node. data . local . into ( ) ) ,
418
418
reason : BackwardIncompatibleDropReason :: Edition2024 ,
419
419
} ,
420
- } ;
420
+ ) ;
421
421
cfg. push ( block, stmt) ;
422
422
let target = blocks[ drop_node. next ] . unwrap ( ) ;
423
423
if target != block {
@@ -434,10 +434,10 @@ impl DropTree {
434
434
// Root nodes don't correspond to a drop.
435
435
DropKind :: Storage if drop_idx == ROOT_NODE => { }
436
436
DropKind :: Storage => {
437
- let stmt = Statement {
438
- source_info : drop_node. data . source_info ,
439
- kind : StatementKind :: StorageDead ( drop_node. data . local ) ,
440
- } ;
437
+ let stmt = Statement :: new (
438
+ drop_node. data . source_info ,
439
+ StatementKind :: StorageDead ( drop_node. data . local ) ,
440
+ ) ;
441
441
cfg. push ( block, stmt) ;
442
442
let target = blocks[ drop_node. next ] . unwrap ( ) ;
443
443
if target != block {
@@ -866,21 +866,21 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
866
866
DropKind :: ForLint => {
867
867
self . cfg . push (
868
868
block,
869
- Statement {
869
+ Statement :: new (
870
870
source_info,
871
- kind : StatementKind :: BackwardIncompatibleDropHint {
871
+ StatementKind :: BackwardIncompatibleDropHint {
872
872
place : Box :: new ( local. into ( ) ) ,
873
873
reason : BackwardIncompatibleDropReason :: Edition2024 ,
874
874
} ,
875
- } ,
875
+ ) ,
876
876
) ;
877
877
}
878
878
DropKind :: Storage => {
879
879
// Only temps and vars need their storage dead.
880
880
assert ! ( local. index( ) > self . arg_count) ;
881
881
self . cfg . push (
882
882
block,
883
- Statement { source_info, kind : StatementKind :: StorageDead ( local) } ,
883
+ Statement :: new ( source_info, StatementKind :: StorageDead ( local) ) ,
884
884
) ;
885
885
}
886
886
}
@@ -1622,13 +1622,13 @@ where
1622
1622
1623
1623
cfg. push (
1624
1624
block,
1625
- Statement {
1625
+ Statement :: new (
1626
1626
source_info,
1627
- kind : StatementKind :: BackwardIncompatibleDropHint {
1627
+ StatementKind :: BackwardIncompatibleDropHint {
1628
1628
place : Box :: new ( local. into ( ) ) ,
1629
1629
reason : BackwardIncompatibleDropReason :: Edition2024 ,
1630
1630
} ,
1631
- } ,
1631
+ ) ,
1632
1632
) ;
1633
1633
}
1634
1634
DropKind :: Storage => {
@@ -1652,7 +1652,7 @@ where
1652
1652
}
1653
1653
// Only temps and vars need their storage dead.
1654
1654
assert ! ( local. index( ) > arg_count) ;
1655
- cfg. push ( block, Statement { source_info, kind : StatementKind :: StorageDead ( local) } ) ;
1655
+ cfg. push ( block, Statement :: new ( source_info, StatementKind :: StorageDead ( local) ) ) ;
1656
1656
}
1657
1657
}
1658
1658
}
0 commit comments