Change how AssocItem is reported.

Currently it's reported as either `TraitItem` or `ImplItem`. This commit
changes it to `AssocItem`, because having the report match the type name
is (a) consistent with other types, and (b) the trait/impl split isn't
that important here.
This commit is contained in:
Nicholas Nethercote 2022-08-11 12:34:52 +10:00
parent 288b6672be
commit 6a3c663cbb
2 changed files with 3 additions and 9 deletions

View File

@ -333,11 +333,7 @@ impl<'v> ast_visit::Visitor<'v> for StatCollector<'v> {
}
fn visit_assoc_item(&mut self, item: &'v ast::AssocItem, ctxt: ast_visit::AssocCtxt) {
let label = match ctxt {
ast_visit::AssocCtxt::Trait => "TraitItem",
ast_visit::AssocCtxt::Impl => "ImplItem",
};
self.record(label, Id::None, item);
self.record("AssocItem", Id::None, item);
ast_visit::walk_assoc_item(self, item, ctxt);
}

View File

@ -17,10 +17,9 @@ FnDecl 200 5 40
Variant 240 2 120
Block 288 6 48
Attribute 304 2 152
ImplItem 320 2 160
TraitItem 320 2 160
GenericBound 352 4 88
GenericParam 520 5 104
AssocItem 640 4 160
PathSegment 720 30 24
Expr 832 8 104
Pat 840 7 120
@ -48,11 +47,10 @@ Param 160 4 40
FnDecl 200 5 40
Variant 240 2 120
Block 288 6 48
ImplItem 320 2 160
TraitItem 320 2 160
GenericBound 352 4 88
GenericParam 520 5 104
Attribute 608 4 152
AssocItem 640 4 160
PathSegment 792 33 24
Pat 840 7 120
Expr 936 9 104