Skip to content

Commit 648093d

Browse files
committed
review comments
1 parent e4c1caa commit 648093d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_resolve/src/late.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,14 @@ enum LifetimeBinderKind {
374374
FnPtrType,
375375
PolyTrait,
376376
WhereBound,
377+
// Item covers foreign items, ADTs, type aliases, trait associated items and
378+
// trait alias associated items.
377379
Item,
378380
ConstItem,
379381
Function,
380382
Closure,
381383
ImplBlock,
384+
// Covers only `impl` associated types.
382385
ImplAssocType,
383386
}
384387

@@ -1963,14 +1966,12 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
19631966
let Some((rib, span)) = self.lifetime_ribs[..i]
19641967
.iter()
19651968
.rev()
1966-
.skip(1)
1967-
.filter_map(|rib| match rib.kind {
1969+
.find_map(|rib| match rib.kind {
19681970
LifetimeRibKind::Generics { span, kind: LifetimeBinderKind::ImplBlock, .. } => {
19691971
Some((rib, span))
19701972
}
19711973
_ => None,
19721974
})
1973-
.next()
19741975
else {
19751976
return;
19761977
};

0 commit comments

Comments
 (0)