Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov

Unify FnKind between AST visitors and make WalkItemKind more straight forward

Unifying `FnKind` requires a bunch of changes to `WalkItemKind::walk` signature so I'll change them in one go

related to #128974

r? `@petrochenkov`
This commit is contained in:
Matthias Krüger 2024-11-16 21:05:46 +01:00 committed by GitHub
commit 6b47c6d786
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 157 additions and 88 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.span, item.id, &item.ident, &item.vis, (), self);
visit::walk_list!(self, visit_attribute, &item.attrs);
}
_ => visit::walk_item(self, item),