Skip to content

Commit 9e7e11b

Browse files
committed
Remove an unnecessary lifetime from RemapLateParam.
1 parent 1087830 commit 9e7e11b

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
@@ -430,12 +430,12 @@ fn compare_method_predicate_entailment<'tcx>(
430430
Ok(())
431431
}
432432

433-
struct RemapLateParam<'a, 'tcx> {
433+
struct RemapLateParam<'tcx> {
434434
tcx: TyCtxt<'tcx>,
435-
mapping: &'a FxIndexMap<ty::LateParamRegionKind, ty::LateParamRegionKind>,
435+
mapping: FxIndexMap<ty::LateParamRegionKind, ty::LateParamRegionKind>,
436436
}
437437

438-
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateParam<'_, 'tcx> {
438+
impl<'tcx> TypeFolder<TyCtxt<'tcx>> for RemapLateParam<'tcx> {
439439
fn cx(&self) -> TyCtxt<'tcx> {
440440
self.tcx
441441
}

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ fn report_mismatched_rpitit_signature<'tcx>(
305305
})
306306
.collect();
307307

308-
let mut return_ty =
309-
trait_m_sig.output().fold_with(&mut super::RemapLateParam { tcx, mapping: &mapping });
308+
let mut return_ty = trait_m_sig.output().fold_with(&mut super::RemapLateParam { tcx, mapping });
310309

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

0 commit comments

Comments
 (0)