Explain the lack of item recursion

This commit is contained in:
Oliver Schneider 2018-06-27 11:41:21 +02:00
parent 98a48fdae6
commit f21a98d8a9

View file

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