@@ -11,6 +11,7 @@ use rustc_mir_dataflow::{
1111 fmt:: DebugWithContext , impls:: MaybeStorageLive , lattice:: JoinSemiLattice , Analysis , AnalysisDomain ,
1212 CallReturnPlaces , ResultsCursor ,
1313} ;
14+ use std:: borrow:: Cow ;
1415use std:: ops:: ControlFlow ;
1516
1617/// Collects the possible borrowers of each local.
@@ -214,7 +215,7 @@ fn rvalue_locals(rvalue: &mir::Rvalue<'_>, mut visit: impl FnMut(mir::Local)) {
214215pub struct PossibleBorrowerMap < ' b , ' tcx > {
215216 body : & ' b mir:: Body < ' tcx > ,
216217 possible_borrower : ResultsCursor < ' b , ' tcx , PossibleBorrowerAnalysis < ' b , ' tcx > > ,
217- maybe_live : ResultsCursor < ' b , ' tcx , MaybeStorageLive > ,
218+ maybe_live : ResultsCursor < ' b , ' tcx , MaybeStorageLive < ' b > > ,
218219 pushed : BitSet < Local > ,
219220 stack : Vec < Local > ,
220221}
@@ -231,7 +232,7 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {
231232 . pass_name ( "possible_borrower" )
232233 . iterate_to_fixpoint ( )
233234 . into_results_cursor ( mir) ;
234- let maybe_live = MaybeStorageLive :: new ( BitSet :: new_empty ( mir. local_decls . len ( ) ) )
235+ let maybe_live = MaybeStorageLive :: new ( Cow :: Owned ( BitSet :: new_empty ( mir. local_decls . len ( ) ) ) )
235236 . into_engine ( cx. tcx , mir)
236237 . pass_name ( "possible_borrower" )
237238 . iterate_to_fixpoint ( )
0 commit comments