Skip to content

Commit 0a27256

Browse files
committed
review comments
1 parent 04804c7 commit 0a27256

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

@@ -1950,14 +1953,12 @@ impl<'a, 'ast, 'ra, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
19501953
let Some((rib, span)) = self.lifetime_ribs[..i]
19511954
.iter()
19521955
.rev()
1953-
.skip(1)
1954-
.filter_map(|rib| match rib.kind {
1956+
.find_map(|rib| match rib.kind {
19551957
LifetimeRibKind::Generics { span, kind: LifetimeBinderKind::ImplBlock, .. } => {
19561958
Some((rib, span))
19571959
}
19581960
_ => None,
19591961
})
1960-
.next()
19611962
else {
19621963
return;
19631964
};

0 commit comments

Comments
 (0)