ast: Stop using Mod
in Crate
Crate root is sufficiently different from `mod` items, at least at syntactic level. Also remove customization point for "`mod` item or crate root" from AST visitors.
This commit is contained in:
parent
d1462d8558
commit
eb65f15c78
23 changed files with 114 additions and 179 deletions
|
@ -20,10 +20,6 @@ impl<'ast> Visitor<'ast> for NodeCounter {
|
|||
self.count += 1;
|
||||
walk_ident(self, ident);
|
||||
}
|
||||
fn visit_mod(&mut self, m: &Mod, _s: Span, _a: &[Attribute], _n: NodeId) {
|
||||
self.count += 1;
|
||||
walk_mod(self, m)
|
||||
}
|
||||
fn visit_foreign_item(&mut self, i: &ForeignItem) {
|
||||
self.count += 1;
|
||||
walk_foreign_item(self, i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue