diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-10 06:47:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-10 06:47:50 +0100 |
| commit | 977d69fc1992b0cef8d8ff020261d5bf9ede7424 (patch) | |
| tree | 44575b3b7866d3d898ab0ad4b736aea7260d6f55 /src/librustc | |
| parent | 5a62acaf9e456280339f37ca2e43fcb277772a18 (diff) | |
| parent | b11cd0b587cc2a663ef358089a2d1cf709170371 (diff) | |
| download | rust-977d69fc1992b0cef8d8ff020261d5bf9ede7424.tar.gz rust-977d69fc1992b0cef8d8ff020261d5bf9ede7424.zip | |
Rollup merge of #69714 - spastorino:place-ref-lifetime, r=oli-obk
Make PlaceRef take just one lifetime r? @eddyb
Diffstat (limited to 'src/librustc')
| -rw-r--r-- | src/librustc/mir/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index 18bdecafecd..b2413f5a2c8 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -1827,9 +1827,9 @@ rustc_index::newtype_index! { } #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] -pub struct PlaceRef<'a, 'tcx> { +pub struct PlaceRef<'tcx> { pub local: Local, - pub projection: &'a [PlaceElem<'tcx>], + pub projection: &'tcx [PlaceElem<'tcx>], } impl<'tcx> Place<'tcx> { @@ -1864,7 +1864,7 @@ impl<'tcx> Place<'tcx> { self.as_ref().as_local() } - pub fn as_ref(&self) -> PlaceRef<'_, 'tcx> { + pub fn as_ref(&self) -> PlaceRef<'tcx> { PlaceRef { local: self.local, projection: &self.projection } } } @@ -1875,7 +1875,7 @@ impl From<Local> for Place<'_> { } } -impl<'a, 'tcx> PlaceRef<'a, 'tcx> { +impl<'tcx> PlaceRef<'tcx> { /// Finds the innermost `Local` from this `Place`, *if* it is either a local itself or /// a single deref of a local. // |
