Skip to content

Commit 58abbaf

Browse files
Revert "Skip late-bound lifetimes when crossing an AnonConst."
This reverts commit a7f6095.
1 parent b73478b commit 58abbaf

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

‎compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -573,17 +573,11 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
573573
// give, we will reverse the IndexMap after early captures.
574574
letmut late_depth = 0;
575575
letmut scope = self.scope;
576-
letmut crossed_late_boundary = None;
577576
letmut opaque_capture_scopes = vec![(opaque.def_id,&captures)];
578577
loop{
579578
match*scope {
580579
Scope::Binder{ref bound_vars, scope_type, s, .. } => {
581580
for(&original_lifetime,&def)in bound_vars.iter().rev(){
582-
ifletResolvedArg::LateBound(..) = def
583-
&& crossed_late_boundary.is_some()
584-
{
585-
continue;
586-
}
587581
ifletDefKind::LifetimeParam = self.tcx.def_kind(original_lifetime){
588582
let def = def.shifted(late_depth);
589583
let ident = lifetime_ident(original_lifetime);
@@ -624,12 +618,8 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
624618

625619
Scope::ObjectLifetimeDefault{ s, .. }
626620
| Scope::Supertrait{ s, .. }
627-
| Scope::TraitRefBoundary{ s, .. } => {
628-
scope = s;
629-
}
630-
631-
Scope::LateBoundary{ s, what, .. } => {
632-
crossed_late_boundary = Some(what);
621+
| Scope::TraitRefBoundary{ s, .. }
622+
| Scope::LateBoundary{ s, .. } => {
633623
scope = s;
634624
}
635625
}

0 commit comments

Comments
 (0)