Skip to content

Commit a5d1e18

Browse files
committed
Make PlaceRef lifetimes of is_prefix_of be both 'tcx
1 parent a32afa3 commit a5d1e18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc_mir/borrow_check/prefixes.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use rustc::mir::{Place, PlaceRef, ProjectionElem, ReadOnlyBodyAndCache};
1313
use rustc::ty::{self, TyCtxt};
1414
use rustc_hir as hir;
1515

16-
pub trait IsPrefixOf<'cx, 'tcx> {
17-
fn is_prefix_of(&self, other: PlaceRef<'cx, 'tcx>) -> bool;
16+
pub trait IsPrefixOf<'tcx> {
17+
fn is_prefix_of(&self, other: PlaceRef<'tcx, 'tcx>) -> bool;
1818
}
1919

20-
impl<'cx, 'tcx> IsPrefixOf<'cx, 'tcx> for PlaceRef<'cx, 'tcx> {
21-
fn is_prefix_of(&self, other: PlaceRef<'cx, 'tcx>) -> bool {
20+
impl<'tcx> IsPrefixOf<'tcx> for PlaceRef<'tcx, 'tcx> {
21+
fn is_prefix_of(&self, other: PlaceRef<'tcx, 'tcx>) -> bool {
2222
self.local == other.local
2323
&& self.projection.len() <= other.projection.len()
2424
&& self.projection == &other.projection[..self.projection.len()]

0 commit comments

Comments
 (0)