Make PlaceRef lifetimes of in_projection be both 'tcx

This commit is contained in:
Santiago Pastorino 2020-03-04 18:18:15 -03:00
parent a5d1e189a1
commit 2cb2559c18
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
2 changed files with 4 additions and 4 deletions

View file

@ -483,7 +483,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
self.builder.data.loc_map[self.loc].push(move_out);
}
fn gather_init(&mut self, place: PlaceRef<'cx, 'tcx>, kind: InitKind) {
fn gather_init(&mut self, place: PlaceRef<'tcx, 'tcx>, kind: InitKind) {
debug!("gather_init({:?}, {:?})", self.loc, place);
let mut place = place;

View file

@ -35,7 +35,7 @@ pub trait Qualif {
fn in_projection_structurally(
cx: &ConstCx<'_, 'tcx>,
per_local: &mut impl FnMut(Local) -> bool,
place: PlaceRef<'_, 'tcx>,
place: PlaceRef<'tcx, 'tcx>,
) -> bool {
if let [proj_base @ .., elem] = place.projection {
let base_qualif = Self::in_place(
@ -67,7 +67,7 @@ pub trait Qualif {
fn in_projection(
cx: &ConstCx<'_, 'tcx>,
per_local: &mut impl FnMut(Local) -> bool,
place: PlaceRef<'_, 'tcx>,
place: PlaceRef<'tcx, 'tcx>,
) -> bool {
Self::in_projection_structurally(cx, per_local, place)
}
@ -75,7 +75,7 @@ pub trait Qualif {
fn in_place(
cx: &ConstCx<'_, 'tcx>,
per_local: &mut impl FnMut(Local) -> bool,
place: PlaceRef<'_, 'tcx>,
place: PlaceRef<'tcx, 'tcx>,
) -> bool {
match place {
PlaceRef { local, projection: [] } => per_local(local),