We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b1f349 commit 2e850ccCopy full SHA for 2e850cc
compiler/rustc_hir_analysis/src/check/wfcheck.rs
@@ -2300,9 +2300,8 @@ fn lint_redundant_lifetimes<'tcx>(
2300
tcx.fn_sig(owner_id).instantiate_identity().bound_vars().iter().enumerate()
2301
{
2302
let ty::BoundVariableKind::Region(kind) = var else { continue };
2303
- let bound: ty::BoundRegion =
2304
- ty::BoundRegion { var: ty::BoundVar::from_usize(idx), kind };
2305
- lifetimes.push(ty::Region::new_late_param_from_bound(tcx, owner_id.to_def_id(), bound));
+ let kind = ty::LateParamRegionKind::from_bound(ty::BoundVar::from_usize(idx), kind);
+ lifetimes.push(ty::Region::new_late_param(tcx, owner_id.to_def_id(), kind));
2306
}
2307
2308
lifetimes.retain(|candidate| candidate.has_name());
0 commit comments