Skip to content

Commit ceb09de

Browse files
committed
Remove an unnecessary lifetime from RemapLateParam.
1 parent c2e37d3 commit ceb09de

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Diff for: compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,12 @@ fn compare_method_predicate_entailment<'tcx>(
424424
Ok(())
425425
}
426426

427-
struct RemapLateParam<'a, 'tcx> {
427+
struct RemapLateParam<'tcx> {
428428
tcx: TyCtxt<'tcx>,
429-
mapping: &'a FxIndexMap<ty::LateParamRegionKind, ty::LateParamRegionKind>,
429+
mapping: FxIndexMap<ty::LateParamRegionKind, ty::LateParamRegionKind>,
430430
}
431431

432-
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateParam<'_, 'tcx> {
432+
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateParam<'tcx> {
433433
fn cx(&self) -> TyCtxt<'tcx> {
434434
self.tcx
435435
}

Diff for: compiler/rustc_hir_analysis/src/check/compare_impl_item/refine.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ fn report_mismatched_rpitit_signature<'tcx>(
299299
})
300300
.collect();
301301

302-
let mut return_ty =
303-
trait_m_sig.output().fold_with(&mut super::RemapLateParam { tcx, mapping: &mapping });
302+
let mut return_ty = trait_m_sig.output().fold_with(&mut super::RemapLateParam { tcx, mapping });
304303

305304
if tcx.asyncness(impl_m_def_id).is_async() && tcx.asyncness(trait_m_def_id).is_async() {
306305
let ty::Alias(ty::Projection, future_ty) = return_ty.kind() else {

0 commit comments

Comments
 (0)