@@ -452,7 +452,7 @@ impl<'a, 'tcx> PossibleBorrowerVisitor<'a, 'tcx> {
452
452
self ,
453
453
cx : & LateContext < ' a , ' tcx > ,
454
454
maybe_live : DataflowResults < ' tcx , MaybeStorageLive < ' a , ' tcx > > ,
455
- ) -> PossibleBorrower < ' a , ' tcx > {
455
+ ) -> PossibleBorrowerMap < ' a , ' tcx > {
456
456
let mut map = FxHashMap :: default ( ) ;
457
457
for row in ( 1 ..self . body . local_decls . len ( ) ) . map ( mir:: Local :: from_usize) {
458
458
if is_copy ( cx, self . body . local_decls [ row] . ty ) {
@@ -475,7 +475,7 @@ impl<'a, 'tcx> PossibleBorrowerVisitor<'a, 'tcx> {
475
475
}
476
476
477
477
let bs = BitSet :: new_empty ( self . body . local_decls . len ( ) ) ;
478
- PossibleBorrower {
478
+ PossibleBorrowerMap {
479
479
map,
480
480
maybe_live : DataflowResultsCursor :: new ( maybe_live, self . body ) ,
481
481
bitset : ( bs. clone ( ) , bs) ,
@@ -557,15 +557,15 @@ fn rvalue_locals(rvalue: &mir::Rvalue<'_>, mut visit: impl FnMut(mir::Local)) {
557
557
}
558
558
559
559
/// Result of `PossibleBorrowerVisitor`.
560
- struct PossibleBorrower < ' a , ' tcx > {
560
+ struct PossibleBorrowerMap < ' a , ' tcx > {
561
561
/// Mapping `Local -> its possible borrowers`
562
562
map : FxHashMap < mir:: Local , HybridBitSet < mir:: Local > > ,
563
563
maybe_live : DataflowResultsCursor < ' a , ' tcx , MaybeStorageLive < ' a , ' tcx > > ,
564
564
// Caches to avoid allocation of `BitSet` on every query
565
565
bitset : ( BitSet < mir:: Local > , BitSet < mir:: Local > ) ,
566
566
}
567
567
568
- impl PossibleBorrower < ' _ , ' _ > {
568
+ impl PossibleBorrowerMap < ' _ , ' _ > {
569
569
/// Returns true if the set of borrowers of `borrowed` living at `at` matches with `borrowers`.
570
570
fn only_borrowers ( & mut self , borrowers : & [ mir:: Local ] , borrowed : mir:: Local , at : mir:: Location ) -> bool {
571
571
self . maybe_live . seek ( at) ;
0 commit comments