Skip to content

Commit c0b5258

Browse files
committed
Remove unnecessary lifetimes in elaborator structs.
Starting with `ElaborateDropsCtxt`, which then leads to `Elaborator`.
1 parent 9ed1e9c commit c0b5258

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

compiler/rustc_mir_transform/src/elaborate_drops.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,24 +137,24 @@ impl InitializationData<'_, '_> {
137137
}
138138
}
139139

140-
struct Elaborator<'a, 'b, 'mir, 'tcx> {
141-
ctxt: &'a mut ElaborateDropsCtxt<'b, 'mir, 'tcx>,
140+
struct Elaborator<'a, 'mir, 'tcx> {
141+
ctxt: &'a mut ElaborateDropsCtxt<'mir, 'tcx>,
142142
}
143143

144-
impl fmt::Debug for Elaborator<'_, '_, '_, '_> {
144+
impl fmt::Debug for Elaborator<'_, '_, '_> {
145145
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
146146
Ok(())
147147
}
148148
}
149149

150-
impl<'a, 'tcx> DropElaborator<'a, 'tcx> for Elaborator<'a, '_, '_, 'tcx> {
150+
impl<'mir, 'tcx> DropElaborator<'mir, 'tcx> for Elaborator<'_, 'mir, 'tcx> {
151151
type Path = MovePathIndex;
152152

153153
fn patch(&mut self) -> &mut MirPatch<'tcx> {
154154
&mut self.ctxt.patch
155155
}
156156

157-
fn body(&self) -> &'a Body<'tcx> {
157+
fn body(&self) -> &'mir Body<'tcx> {
158158
self.ctxt.body
159159
}
160160

@@ -241,17 +241,17 @@ impl<'a, 'tcx> DropElaborator<'a, 'tcx> for Elaborator<'a, '_, '_, 'tcx> {
241241
}
242242
}
243243

244-
struct ElaborateDropsCtxt<'a, 'mir, 'tcx> {
244+
struct ElaborateDropsCtxt<'mir, 'tcx> {
245245
tcx: TyCtxt<'tcx>,
246246
body: &'mir Body<'tcx>,
247-
env: &'a MoveDataParamEnv<'tcx>,
247+
env: &'mir MoveDataParamEnv<'tcx>,
248248
init_data: InitializationData<'mir, 'tcx>,
249249
drop_flags: IndexVec<MovePathIndex, Option<Local>>,
250250
patch: MirPatch<'tcx>,
251251
}
252252

253-
impl<'b, 'mir, 'tcx> ElaborateDropsCtxt<'b, 'mir, 'tcx> {
254-
fn move_data(&self) -> &'b MoveData<'tcx> {
253+
impl<'mir, 'tcx> ElaborateDropsCtxt<'mir, 'tcx> {
254+
fn move_data(&self) -> &'mir MoveData<'tcx> {
255255
&self.env.move_data
256256
}
257257

0 commit comments

Comments
 (0)