ast: Generalize item kind visiting
And avoid duplicating logic for visiting `Item`s with different kinds (regular, associated, foreign).
This commit is contained in:
parent
38dd569150
commit
5be9fdd636
18 changed files with 410 additions and 382 deletions
|
@ -498,7 +498,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
|
|||
(self, i, i.kind, Id::None, ast, ForeignItem, ForeignItemKind),
|
||||
[Static, Fn, TyAlias, MacCall]
|
||||
);
|
||||
ast_visit::walk_foreign_item(self, i)
|
||||
ast_visit::walk_item(self, i)
|
||||
}
|
||||
|
||||
fn visit_item(&mut self, i: &'v ast::Item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue