Remove spotlight for trait aliases and fix nits
This commit is contained in:
parent
c20357a62a
commit
b1d82ac6ed
@ -1899,13 +1899,11 @@ fn clean(&self, cx: &DocContext) -> Item {
|
||||
pub struct TraitAlias {
|
||||
pub generics: Generics,
|
||||
pub bounds: Vec<GenericBound>,
|
||||
pub is_spotlight: bool,
|
||||
}
|
||||
|
||||
impl Clean<Item> for doctree::TraitAlias {
|
||||
fn clean(&self, cx: &DocContext) -> Item {
|
||||
let attrs = self.attrs.clean(cx);
|
||||
let is_spotlight = attrs.has_doc_flag("spotlight");
|
||||
Item {
|
||||
name: Some(self.name.clean(cx)),
|
||||
attrs,
|
||||
@ -1917,7 +1915,6 @@ fn clean(&self, cx: &DocContext) -> Item {
|
||||
inner: TraitAliasItem(TraitAlias {
|
||||
generics: self.generics.clean(cx),
|
||||
bounds: self.bounds.clean(cx),
|
||||
is_spotlight,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
@ -1925,7 +1925,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
print_entries(f, &self.derives, "Derive Macros", "derives")?;
|
||||
print_entries(f, &self.functions, "Functions", "functions")?;
|
||||
print_entries(f, &self.typedefs, "Typedefs", "typedefs")?;
|
||||
print_entries(f, &self.trait_aliases, "Trait Aliases", "trait-alias")?;
|
||||
print_entries(f, &self.trait_aliases, "Trait Aliases", "trait-aliases")?;
|
||||
print_entries(f, &self.existentials, "Existentials", "existentials")?;
|
||||
print_entries(f, &self.statics, "Statics", "statics")?;
|
||||
print_entries(f, &self.constants, "Constants", "constants")
|
||||
@ -4863,7 +4863,7 @@ fn item_ty_to_strs(ty: &ItemType) -> (&'static str, &'static str) {
|
||||
ItemType::Existential => ("existentials", "Existentials"),
|
||||
ItemType::ProcAttribute => ("attributes", "Attribute Macros"),
|
||||
ItemType::ProcDerive => ("derives", "Derive Macros"),
|
||||
ItemType::TraitAlias => ("trait-alias", "Trait aliases"),
|
||||
ItemType::TraitAlias => ("trait-aliases", "Trait aliases"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
// @has foo/all.html '//a[@href="traitalias.Alias2.html"]' 'Alias2'
|
||||
// @has foo/all.html '//a[@href="traitalias.Foo.html"]' 'Foo'
|
||||
|
||||
// @has foo/index.html '//h2[@id="trait-alias"]' 'Trait aliases'
|
||||
// @has foo/index.html '//h2[@id="trait-aliases"]' 'Trait aliases'
|
||||
// @has foo/index.html '//a[@class="traitalias"]' 'CopyAlias'
|
||||
// @has foo/index.html '//a[@class="traitalias"]' 'Alias2'
|
||||
// @has foo/index.html '//a[@class="traitalias"]' 'Foo'
|
||||
|
Loading…
Reference in New Issue
Block a user