diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs index 8ffbd6be418..8894b9732fe 100644 --- a/src/librustdoc/clean/inline.rs +++ b/src/librustdoc/clean/inline.rs @@ -432,7 +432,6 @@ pub fn build_impl<'a, 'tcx>(cx: &DocContext, ret.push(clean::Item { inner: clean::ImplItem(clean::Impl { unsafety: hir::Unsafety::Normal, // FIXME: this should be decoded - derived: clean::detect_derived(&attrs), provided_trait_methods: provided, trait_: trait_, for_: for_, diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 65902205312..139dedeb70f 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -2239,14 +2239,9 @@ pub struct Impl { pub trait_: Option, pub for_: Type, pub items: Vec, - pub derived: bool, pub polarity: Option, } -fn detect_derived(attrs: &[M]) -> bool { - attr::contains_name(attrs, "automatically_derived") -} - impl Clean> for doctree::Impl { fn clean(&self, cx: &DocContext) -> Vec { let mut ret = Vec::new(); @@ -2283,7 +2278,6 @@ impl Clean> for doctree::Impl { trait_: trait_, for_: self.for_.clean(cx), items: items, - derived: detect_derived(&self.attrs), polarity: Some(self.polarity.clean(cx)), }), }); diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index f63d37b3403..21463527ab9 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -399,7 +399,6 @@ fn init_ids() -> HashMap { "methods", "deref-methods", "implementations", - "derived_implementations" ].into_iter().map(|id| (String::from(*id), 1)).collect() } @@ -2524,25 +2523,11 @@ fn render_assoc_items(w: &mut fmt::Formatter, } write!(w, "

Trait \ Implementations

")?; - let (derived, manual): (Vec<_>, Vec<&Impl>) = traits.iter().partition(|i| { - i.inner_impl().derived - }); - for i in &manual { + for i in &traits { let did = i.trait_did().unwrap(); let assoc_link = AssocItemLink::GotoSource(did, &i.inner_impl().provided_trait_methods); render_impl(w, cx, i, assoc_link, true, containing_item.stable_since())?; } - if !derived.is_empty() { - write!(w, "

\ - Derived Implementations \ -

")?; - for i in &derived { - let did = i.trait_did().unwrap(); - let assoc_link = AssocItemLink::GotoSource(did, - &i.inner_impl().provided_trait_methods); - render_impl(w, cx, i, assoc_link, true, containing_item.stable_since())?; - } - } } Ok(()) }