@@ -11,6 +11,7 @@ use rustc_mir_dataflow::{
11
11
fmt:: DebugWithContext , impls:: MaybeStorageLive , lattice:: JoinSemiLattice , Analysis , AnalysisDomain ,
12
12
CallReturnPlaces , ResultsCursor ,
13
13
} ;
14
+ use std:: borrow:: Cow ;
14
15
use std:: ops:: ControlFlow ;
15
16
16
17
/// Collects the possible borrowers of each local.
@@ -214,7 +215,7 @@ fn rvalue_locals(rvalue: &mir::Rvalue<'_>, mut visit: impl FnMut(mir::Local)) {
214
215
pub struct PossibleBorrowerMap < ' b , ' tcx > {
215
216
body : & ' b mir:: Body < ' tcx > ,
216
217
possible_borrower : ResultsCursor < ' b , ' tcx , PossibleBorrowerAnalysis < ' b , ' tcx > > ,
217
- maybe_live : ResultsCursor < ' b , ' tcx , MaybeStorageLive > ,
218
+ maybe_live : ResultsCursor < ' b , ' tcx , MaybeStorageLive < ' b > > ,
218
219
pushed : BitSet < Local > ,
219
220
stack : Vec < Local > ,
220
221
}
@@ -231,7 +232,7 @@ impl<'b, 'tcx> PossibleBorrowerMap<'b, 'tcx> {
231
232
. pass_name ( "possible_borrower" )
232
233
. iterate_to_fixpoint ( )
233
234
. 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 ( ) ) ) )
235
236
. into_engine ( cx. tcx , mir)
236
237
. pass_name ( "possible_borrower" )
237
238
. iterate_to_fixpoint ( )
0 commit comments