1
Fork 0

Add WalkItemKind::Ctxt so AssocCtxt is not sent to non-Assoc ItemKinds

This commit is contained in:
maxcabrajac 2024-11-08 18:51:28 -03:00
parent 1236656319
commit 6180173612
7 changed files with 35 additions and 27 deletions

View file

@ -1324,7 +1324,7 @@ impl<'a, 'ra, 'tcx> Visitor<'a> for BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
// This way they can use `macro_rules` defined later.
self.visit_vis(&item.vis);
self.visit_ident(&item.ident);
item.kind.walk(item, AssocCtxt::Trait, self);
item.kind.walk(item, (), self);
visit::walk_list!(self, visit_attribute, &item.attrs);
}
_ => visit::walk_item(self, item),