From a5d1e189a12433d61ded6da47df76929cf8e94c1 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Wed, 4 Mar 2020 18:13:47 -0300 Subject: [PATCH] Make PlaceRef lifetimes of is_prefix_of be both 'tcx --- src/librustc_mir/borrow_check/prefixes.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_mir/borrow_check/prefixes.rs b/src/librustc_mir/borrow_check/prefixes.rs index b66fd42d9c0..25356cd17ef 100644 --- a/src/librustc_mir/borrow_check/prefixes.rs +++ b/src/librustc_mir/borrow_check/prefixes.rs @@ -13,12 +13,12 @@ use rustc::ty::{self, TyCtxt}; use rustc_hir as hir; -pub trait IsPrefixOf<'cx, 'tcx> { - fn is_prefix_of(&self, other: PlaceRef<'cx, 'tcx>) -> bool; +pub trait IsPrefixOf<'tcx> { + fn is_prefix_of(&self, other: PlaceRef<'tcx, 'tcx>) -> bool; } -impl<'cx, 'tcx> IsPrefixOf<'cx, 'tcx> for PlaceRef<'cx, 'tcx> { - fn is_prefix_of(&self, other: PlaceRef<'cx, 'tcx>) -> bool { +impl<'tcx> IsPrefixOf<'tcx> for PlaceRef<'tcx, 'tcx> { + fn is_prefix_of(&self, other: PlaceRef<'tcx, 'tcx>) -> bool { self.local == other.local && self.projection.len() <= other.projection.len() && self.projection == &other.projection[..self.projection.len()] -- 2.44.0