@@ -651,36 +651,34 @@ fn locals_live_across_suspend_points<'tcx>(
651651 always_live_locals : & BitSet < Local > ,
652652 movable : bool ,
653653) -> LivenessInfo {
654- let body_ref: & Body < ' _ > = body;
655-
656654 // Calculate when MIR locals have live storage. This gives us an upper bound of their
657655 // lifetimes.
658656 let mut storage_live = MaybeStorageLive :: new ( std:: borrow:: Cow :: Borrowed ( always_live_locals) )
659- . into_engine ( tcx, body_ref )
657+ . into_engine ( tcx, body )
660658 . iterate_to_fixpoint ( )
661- . into_results_cursor ( body_ref ) ;
659+ . into_results_cursor ( body ) ;
662660
663661 // Calculate the MIR locals which have been previously
664662 // borrowed (even if they are still active).
665663 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 ( ) ;
667665
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 ) ;
669667
670668 // Calculate the MIR locals that we actually need to keep storage around
671669 // for.
672670 let mut requires_storage_results =
673671 MaybeRequiresStorage :: new ( borrowed_locals_results. cloned_results_cursor ( body) )
674- . into_engine ( tcx, body_ref )
672+ . into_engine ( tcx, body )
675673 . 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 ) ;
677675
678676 // Calculate the liveness of MIR locals ignoring borrows.
679677 let mut liveness = MaybeLiveLocals
680- . into_engine ( tcx, body_ref )
678+ . into_engine ( tcx, body )
681679 . pass_name ( "coroutine" )
682680 . iterate_to_fixpoint ( )
683- . into_results_cursor ( body_ref ) ;
681+ . into_results_cursor ( body ) ;
684682
685683 let mut storage_liveness_map = IndexVec :: from_elem ( None , & body. basic_blocks ) ;
686684 let mut live_locals_at_suspension_points = Vec :: new ( ) ;
@@ -746,7 +744,7 @@ fn locals_live_across_suspend_points<'tcx>(
746744 . collect ( ) ;
747745
748746 let storage_conflicts = compute_storage_conflicts (
749- body_ref ,
747+ body ,
750748 & saved_locals,
751749 always_live_locals. clone ( ) ,
752750 requires_storage_results,
0 commit comments