about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-11 12:34:52 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-08-11 12:46:55 +1000
commit6a3c663cbb65b08c7a7356cc3745eb9b75493bc6 (patch)
tree8bfe6137a6d45d0b9ee02f01dcafe93209e09f56 /compiler
parent288b6672be6560fe45f8bb033d581379ec38b4a0 (diff)
downloadrust-6a3c663cbb65b08c7a7356cc3745eb9b75493bc6.tar.gz
rust-6a3c663cbb65b08c7a7356cc3745eb9b75493bc6.zip
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.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_passes/src/hir_stats.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_passes/src/hir_stats.rs b/compiler/rustc_passes/src/hir_stats.rs
index 080c7df47a0..9d366324092 100644
--- a/compiler/rustc_passes/src/hir_stats.rs
+++ b/compiler/rustc_passes/src/hir_stats.rs
@@ -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);
     }