diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2020-03-04 18:13:47 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2020-03-04 18:13:47 -0300 |
| commit | a5d1e189a12433d61ded6da47df76929cf8e94c1 (patch) | |
| tree | c23ab903f2a727adac4665f9f373bde3d7e1a9c0 | |
| parent | a32afa33c8a8ad58607bafbfb9399b2c51495e61 (diff) | |
| download | rust-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.rs | 8 |
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()] |
