Skip to content

Commit

Permalink
Make PlaceRef lifetimes of in_projection be both 'tcx
Browse files Browse the repository at this point in the history
  • Loading branch information
spastorino committed Mar 4, 2020
1 parent a5d1e18 commit 2cb2559
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/dataflow/move_paths/builder.rs
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc_mir/transform/check_consts/qualifs.rs
Expand Up @@ -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(
Expand Down Expand Up @@ -67,15 +67,15 @@ 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)
}

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),
Expand Down

0 comments on commit 2cb2559

Please sign in to comment.