@@ -651,36 +651,34 @@ fn locals_live_across_suspend_points<'tcx>(
651
651
always_live_locals : & BitSet < Local > ,
652
652
movable : bool ,
653
653
) -> LivenessInfo {
654
- let body_ref: & Body < ' _ > = body;
655
-
656
654
// Calculate when MIR locals have live storage. This gives us an upper bound of their
657
655
// lifetimes.
658
656
let mut storage_live = MaybeStorageLive :: new ( std:: borrow:: Cow :: Borrowed ( always_live_locals) )
659
- . into_engine ( tcx, body_ref )
657
+ . into_engine ( tcx, body )
660
658
. iterate_to_fixpoint ( )
661
- . into_results_cursor ( body_ref ) ;
659
+ . into_results_cursor ( body ) ;
662
660
663
661
// Calculate the MIR locals which have been previously
664
662
// borrowed (even if they are still active).
665
663
let borrowed_locals_results =
666
- MaybeBorrowedLocals . into_engine ( tcx, body_ref ) . pass_name ( "coroutine" ) . iterate_to_fixpoint ( ) ;
664
+ MaybeBorrowedLocals . into_engine ( tcx, body ) . pass_name ( "coroutine" ) . iterate_to_fixpoint ( ) ;
667
665
668
- let mut borrowed_locals_cursor = borrowed_locals_results. cloned_results_cursor ( body_ref ) ;
666
+ let mut borrowed_locals_cursor = borrowed_locals_results. cloned_results_cursor ( body ) ;
669
667
670
668
// Calculate the MIR locals that we actually need to keep storage around
671
669
// for.
672
670
let mut requires_storage_results =
673
671
MaybeRequiresStorage :: new ( borrowed_locals_results. cloned_results_cursor ( body) )
674
- . into_engine ( tcx, body_ref )
672
+ . into_engine ( tcx, body )
675
673
. iterate_to_fixpoint ( ) ;
676
- let mut requires_storage_cursor = requires_storage_results. as_results_cursor ( body_ref ) ;
674
+ let mut requires_storage_cursor = requires_storage_results. as_results_cursor ( body ) ;
677
675
678
676
// Calculate the liveness of MIR locals ignoring borrows.
679
677
let mut liveness = MaybeLiveLocals
680
- . into_engine ( tcx, body_ref )
678
+ . into_engine ( tcx, body )
681
679
. pass_name ( "coroutine" )
682
680
. iterate_to_fixpoint ( )
683
- . into_results_cursor ( body_ref ) ;
681
+ . into_results_cursor ( body ) ;
684
682
685
683
let mut storage_liveness_map = IndexVec :: from_elem ( None , & body. basic_blocks ) ;
686
684
let mut live_locals_at_suspension_points = Vec :: new ( ) ;
@@ -746,7 +744,7 @@ fn locals_live_across_suspend_points<'tcx>(
746
744
. collect ( ) ;
747
745
748
746
let storage_conflicts = compute_storage_conflicts (
749
- body_ref ,
747
+ body ,
750
748
& saved_locals,
751
749
always_live_locals. clone ( ) ,
752
750
requires_storage_results,
0 commit comments