Skip to content

Commit 091802d

Browse files
committed
Rewrite recurseive place traversal to iteration
1 parent e684ea3 commit 091802d

39 files changed

+1066
-1267
lines changed

src/librustc/mir/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,33 +1779,33 @@ impl<'a, 'tcx> Place<'tcx> {
17791779

17801780
pub fn field(
17811781
self,
1782-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
1782+
tcx: TyCtxt<'_, '_, 'tcx>,
17831783
f: Field,
17841784
ty: Ty<'tcx>,
17851785
) -> Self {
17861786
self.elem(tcx, ProjectionElem::Field(f, ty))
17871787
}
17881788

1789-
pub fn deref(self, tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Self {
1789+
pub fn deref(self, tcx: TyCtxt<'_, '_, 'tcx>) -> Self {
17901790
self.elem(tcx, ProjectionElem::Deref)
17911791
}
17921792

17931793
pub fn downcast(
17941794
self,
1795-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
1795+
tcx: TyCtxt<'_, '_, 'tcx>,
17961796
adt_def: &'tcx AdtDef,
17971797
variant_index: usize,
17981798
) -> Self {
17991799
self.elem(tcx, ProjectionElem::Downcast(adt_def, variant_index))
18001800
}
18011801

1802-
pub fn index(self, tcx: TyCtxt<'a, 'tcx, 'tcx>, index: Local) -> Self {
1802+
pub fn index(self, tcx: TyCtxt<'_, '_, 'tcx>, index: Local) -> Self {
18031803
self.elem(tcx, ProjectionElem::Index(index))
18041804
}
18051805

18061806
pub fn constant_index(
18071807
self,
1808-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
1808+
tcx: TyCtxt<'_, '_, 'tcx>,
18091809
offset: u32,
18101810
min_length: u32,
18111811
from_end: bool,
@@ -1817,7 +1817,7 @@ impl<'a, 'tcx> Place<'tcx> {
18171817

18181818
pub fn subslice(
18191819
self,
1820-
tcx: TyCtxt<'a, 'tcx, 'tcx>,
1820+
tcx: TyCtxt<'_, '_, 'tcx>,
18211821
from: u32,
18221822
to: u32,
18231823
) -> Self {

0 commit comments

Comments
 (0)