about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-09-22 21:34:55 +0200
committerGitHub <noreply@github.com>2022-09-22 21:34:55 +0200
commita99e675a982713821835002e2d2501b70ab7dda5 (patch)
tree5207655fc2311a2c1271e04ed403ea03aad46ce5
parentaa384834d74f8e2415a74f8a64a1704c71b66be9 (diff)
parentd3f97a331c40f3f64b161aed29f7ef04e607764c (diff)
downloadrust-a99e675a982713821835002e2d2501b70ab7dda5.tar.gz
rust-a99e675a982713821835002e2d2501b70ab7dda5.zip
Rollup merge of #102135 - GuillaumeGomez:rename-alltypes-fields, r=notriddle
Improve some AllTypes fields name

r? `@notriddle`
-rw-r--r--src/librustdoc/html/render/mod.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 7e5e4df43d2..621f83824d9 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -239,8 +239,8 @@ struct AllTypes {
     opaque_tys: FxHashSet<ItemEntry>,
     statics: FxHashSet<ItemEntry>,
     constants: FxHashSet<ItemEntry>,
-    attributes: FxHashSet<ItemEntry>,
-    derives: FxHashSet<ItemEntry>,
+    attribute_macros: FxHashSet<ItemEntry>,
+    derive_macros: FxHashSet<ItemEntry>,
     trait_aliases: FxHashSet<ItemEntry>,
 }
 
@@ -259,8 +259,8 @@ impl AllTypes {
             opaque_tys: new_set(100),
             statics: new_set(100),
             constants: new_set(100),
-            attributes: new_set(100),
-            derives: new_set(100),
+            attribute_macros: new_set(100),
+            derive_macros: new_set(100),
             trait_aliases: new_set(100),
         }
     }
@@ -283,8 +283,10 @@ impl AllTypes {
                 ItemType::OpaqueTy => self.opaque_tys.insert(ItemEntry::new(new_url, name)),
                 ItemType::Static => self.statics.insert(ItemEntry::new(new_url, name)),
                 ItemType::Constant => self.constants.insert(ItemEntry::new(new_url, name)),
-                ItemType::ProcAttribute => self.attributes.insert(ItemEntry::new(new_url, name)),
-                ItemType::ProcDerive => self.derives.insert(ItemEntry::new(new_url, name)),
+                ItemType::ProcAttribute => {
+                    self.attribute_macros.insert(ItemEntry::new(new_url, name))
+                }
+                ItemType::ProcDerive => self.derive_macros.insert(ItemEntry::new(new_url, name)),
                 ItemType::TraitAlias => self.trait_aliases.insert(ItemEntry::new(new_url, name)),
                 _ => true,
             };
@@ -327,10 +329,10 @@ impl AllTypes {
         if !self.constants.is_empty() {
             sections.insert(ItemSection::Constants);
         }
-        if !self.attributes.is_empty() {
+        if !self.attribute_macros.is_empty() {
             sections.insert(ItemSection::AttributeMacros);
         }
-        if !self.derives.is_empty() {
+        if !self.derive_macros.is_empty() {
             sections.insert(ItemSection::DeriveMacros);
         }
         if !self.trait_aliases.is_empty() {
@@ -373,8 +375,8 @@ impl AllTypes {
         print_entries(f, &self.primitives, ItemSection::PrimitiveTypes);
         print_entries(f, &self.traits, ItemSection::Traits);
         print_entries(f, &self.macros, ItemSection::Macros);
-        print_entries(f, &self.attributes, ItemSection::AttributeMacros);
-        print_entries(f, &self.derives, ItemSection::DeriveMacros);
+        print_entries(f, &self.attribute_macros, ItemSection::AttributeMacros);
+        print_entries(f, &self.derive_macros, ItemSection::DeriveMacros);
         print_entries(f, &self.functions, ItemSection::Functions);
         print_entries(f, &self.typedefs, ItemSection::TypeDefinitions);
         print_entries(f, &self.trait_aliases, ItemSection::TraitAliases);