Skip to content

Commit f21a98d

Browse files
committed
Explain the lack of item recursion
1 parent 98a48fd commit f21a98d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/librustc/hir/intravisit.rs

+3
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,9 @@ pub fn walk_ty<'v, V: Visitor<'v>>(visitor: &mut V, typ: &'v Ty) {
608608
visitor.visit_lifetime(lifetime);
609609
}
610610
TyImplTraitExistential(_, def_id, ref lifetimes) => {
611+
// we are not recursing into the `existential` item, because it is already being visited
612+
// as part of the surrounding module. The `NodeId` just exists so we don't have to look
613+
// it up everywhere else in the compiler
611614
visitor.visit_def_mention(Def::Existential(def_id));
612615
walk_list!(visitor, visit_lifetime, lifetimes);
613616
}

0 commit comments

Comments
 (0)