From 2cb2559c18c2d494710ab67324cdc73c4be7a46f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 4 Mar 2020 18:18:15 -0300 Subject: [PATCH] Make PlaceRef lifetimes of in_projection be both 'tcx --- src/librustc_mir/dataflow/move_paths/builder.rs | 2 +- src/librustc_mir/transform/check_consts/qualifs.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs index 57aa5de7f7a31..fb7ae102a0f18 100644 --- a/src/librustc_mir/dataflow/move_paths/builder.rs +++ b/src/librustc_mir/dataflow/move_paths/builder.rs @@ -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; diff --git a/src/librustc_mir/transform/check_consts/qualifs.rs b/src/librustc_mir/transform/check_consts/qualifs.rs index 215496e4d03cb..275b6e4d508f0 100644 --- a/src/librustc_mir/transform/check_consts/qualifs.rs +++ b/src/librustc_mir/transform/check_consts/qualifs.rs @@ -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),