diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2ccad08e03d05..972c2f0e15c5e 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -2689,7 +2689,7 @@ fn render_implementor(cx: &Context, implementor: &Impl, w: &mut fmt::Formatter, _ => false, }; render_impl(w, cx, implementor, AssocItemLink::Anchor(None), RenderMode::Normal, - implementor.impl_item.stable_since(), true, Some(use_absolute))?; + implementor.impl_item.stable_since(), false, Some(use_absolute))?; Ok(()) } @@ -2892,14 +2892,14 @@ fn item_trait(
", id)?;
fmt_impl_for_trait_page(&i.inner_impl(), w, use_absolute)?;
- for it in &i.inner_impl().items {
- if let clean::TypedefItem(ref tydef, _) = it.inner {
- write!(w, " ")?;
- assoc_type(w, it, &vec![], Some(&tydef.type_), AssocItemLink::Anchor(None))?;
- write!(w, ";")?;
+ if show_def_docs {
+ for it in &i.inner_impl().items {
+ if let clean::TypedefItem(ref tydef, _) = it.inner {
+ write!(w, " ")?;
+ assoc_type(w, it, &vec![], Some(&tydef.type_),
+ AssocItemLink::Anchor(None))?;
+ write!(w, ";")?;
+ }
}
}
write!(w, " ")?;
@@ -3929,10 +3932,6 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
let traits = &cache().traits;
let trait_ = i.trait_did().map(|did| &traits[&did]);
- if !show_def_docs {
- write!(w, "")?;
- }
-
write!(w, "")?;
for trait_item in &i.inner_impl().items {
doc_impl_item(w, cx, trait_item, link, render_mode,
@@ -3968,10 +3967,6 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
}
write!(w, " ")?;
- if !show_def_docs {
- write!(w, "")?;
- }
-
Ok(())
}
|