Skip to content

Commit

Permalink
Merge branch 'test_documentation' into feature/integrate-review-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ifxfrancois authored Oct 7, 2024
2 parents 941c054 + b93d6ba commit 85ce51f
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions src/librustdoc/html/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,20 +328,21 @@ impl Ord for ItemEntry {

#[derive(Debug)]
struct AllTypes {
structs: FxIndexSet<ItemEntry>,
enums: FxIndexSet<ItemEntry>,
unions: FxIndexSet<ItemEntry>,
primitives: FxIndexSet<ItemEntry>,
traits: FxIndexSet<ItemEntry>,
macros: FxIndexSet<ItemEntry>,
functions: FxIndexSet<ItemEntry>,
type_aliases: FxIndexSet<ItemEntry>,
statics: FxIndexSet<ItemEntry>,
constants: FxIndexSet<ItemEntry>,
attribute_macros: FxIndexSet<ItemEntry>,
derive_macros: FxIndexSet<ItemEntry>,
trait_aliases: FxIndexSet<ItemEntry>,
tests: FxIndexSet<ItemEntry>,
structs: FxHashSet<ItemEntry>,
enums: FxHashSet<ItemEntry>,
unions: FxHashSet<ItemEntry>,
primitives: FxHashSet<ItemEntry>,
traits: FxHashSet<ItemEntry>,
macros: FxHashSet<ItemEntry>,
functions: FxHashSet<ItemEntry>,
tests: FxHashSet<ItemEntry>,
type_aliases: FxHashSet<ItemEntry>,
statics: FxHashSet<ItemEntry>,
constants: FxHashSet<ItemEntry>,
attribute_macros: FxHashSet<ItemEntry>,
derive_macros: FxHashSet<ItemEntry>,
trait_aliases: FxHashSet<ItemEntry>,
tests: FxHashSet<ItemEntry>,
}

impl AllTypes {
Expand All @@ -355,6 +356,7 @@ impl AllTypes {
traits: new_set(100),
macros: new_set(100),
functions: new_set(100),
tests: new_set(100),
type_aliases: new_set(100),
statics: new_set(100),
constants: new_set(100),
Expand All @@ -379,6 +381,7 @@ impl AllTypes {
ItemType::Trait => self.traits.insert(ItemEntry::new(new_url, name)),
ItemType::Macro => self.macros.insert(ItemEntry::new(new_url, name)),
ItemType::Function => self.functions.insert(ItemEntry::new(new_url, name)),
ItemType::Test => self.tests.insert(ItemEntry::new(new_url, name)),
ItemType::TypeAlias => self.type_aliases.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)),
Expand Down Expand Up @@ -417,6 +420,9 @@ impl AllTypes {
if !self.functions.is_empty() {
sections.insert(ItemSection::Functions);
}
if !self.tests.is_empty() {
sections.insert(ItemSection::Tests);
}
if !self.type_aliases.is_empty() {
sections.insert(ItemSection::TypeAliases);
}
Expand Down

0 comments on commit 85ce51f

Please sign in to comment.