Skip to content
Permalink
Browse files

Remove spotlight for trait aliases and fix nits

  • Loading branch information...
GuillaumeGomez committed Feb 10, 2019
1 parent c20357a commit b1d82ac6ed5f224914c7b89b780663bdfd46eb99
Showing with 3 additions and 6 deletions.
  1. +0 −3 src/librustdoc/clean/mod.rs
  2. +2 −2 src/librustdoc/html/render.rs
  3. +1 −1 src/test/rustdoc/trait_alias.rs
@@ -1899,13 +1899,11 @@ impl Clean<Item> for doctree::Trait {
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 @@ impl Clean<Item> for doctree::TraitAlias {
inner: TraitAliasItem(TraitAlias {
generics: self.generics.clean(cx),
bounds: self.bounds.clean(cx),
is_spotlight,
}),
}
}
@@ -1925,7 +1925,7 @@ impl fmt::Display for AllTypes {
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 @@ use std::fmt::Debug;
// @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'

0 comments on commit b1d82ac

Please sign in to comment.
You can’t perform that action at this time.