]> git.lizzy.rs Git - rust.git/commitdiff
Make PlaceRef lifetimes of is_prefix_of be both 'tcx
authorSantiago Pastorino <spastorino@gmail.com>
Wed, 4 Mar 2020 21:13:47 +0000 (18:13 -0300)
committerSantiago Pastorino <spastorino@gmail.com>
Wed, 4 Mar 2020 21:13:47 +0000 (18:13 -0300)
src/librustc_mir/borrow_check/prefixes.rs

index b66fd42d9c02417914bd4a2e02f69238cb34c66c..25356cd17ef187436f8e09283ff7a7374c45a8ef 100644 (file)
 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()]