about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSantiago Pastorino <spastorino@gmail.com>2020-03-04 18:13:47 -0300
committerSantiago Pastorino <spastorino@gmail.com>2020-03-04 18:13:47 -0300
commita5d1e189a12433d61ded6da47df76929cf8e94c1 (patch)
treec23ab903f2a727adac4665f9f373bde3d7e1a9c0
parenta32afa33c8a8ad58607bafbfb9399b2c51495e61 (diff)
downloadrust-a5d1e189a12433d61ded6da47df76929cf8e94c1.tar.gz
rust-a5d1e189a12433d61ded6da47df76929cf8e94c1.zip
Make PlaceRef lifetimes of is_prefix_of be both 'tcx
-rw-r--r--src/librustc_mir/borrow_check/prefixes.rs8
1 files 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::mir::{Place, PlaceRef, ProjectionElem, ReadOnlyBodyAndCache};
 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()]