make visit_projection take a PlaceRef

This commit is contained in:
Henry Boisdequin 2021-02-16 14:20:36 +05:30
parent 30c5125fbe
commit 5ec4b060a7
4 changed files with 7 additions and 18 deletions

View file

@ -508,12 +508,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
}
};
self.visit_local(&reborrowed_place_ref.local, ctx, location);
self.visit_projection(
reborrowed_place_ref.local,
reborrowed_place_ref.projection,
ctx,
location,
);
self.visit_projection(reborrowed_place_ref, ctx, location);
return;
}
}
@ -526,12 +521,7 @@ impl Visitor<'tcx> for Validator<'mir, 'tcx> {
Mutability::Mut => PlaceContext::MutatingUse(MutatingUseContext::AddressOf),
};
self.visit_local(&reborrowed_place_ref.local, ctx, location);
self.visit_projection(
reborrowed_place_ref.local,
reborrowed_place_ref.projection,
ctx,
location,
);
self.visit_projection(reborrowed_place_ref, ctx, location);
return;
}
}