Skip to content

Commit c1b1d68

Browse files
Don't show default docs
1 parent c1ad1b0 commit c1b1d68

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

src/librustdoc/html/render.rs

+11-16
Original file line numberDiff line numberDiff line change
@@ -2689,7 +2689,7 @@ fn render_implementor(cx: &Context, implementor: &Impl, w: &mut fmt::Formatter,
26892689
_ => false,
26902690
};
26912691
render_impl(w, cx, implementor, AssocItemLink::Anchor(None), RenderMode::Normal,
2692-
implementor.impl_item.stable_since(), true, Some(use_absolute))?;
2692+
implementor.impl_item.stable_since(), false, Some(use_absolute))?;
26932693
Ok(())
26942694
}
26952695

@@ -2892,14 +2892,14 @@ fn item_trait(
28922892
<h2 id='implementors' class='small-section-header'>\
28932893
Implementors<a href='#implementors' class='anchor'></a>\
28942894
</h2>\
2895-
<ul class='item-list' id='implementors-list'>\
2895+
<div class='item-list' id='implementors-list'>\
28962896
";
28972897

28982898
let synthetic_impl_header = "\
28992899
<h2 id='synthetic-implementors' class='small-section-header'>\
29002900
Auto implementors<a href='#synthetic-implementors' class='anchor'></a>\
29012901
</h2>\
2902-
<ul class='item-list' id='synthetic-implementors-list'>\
2902+
<div class='item-list' id='synthetic-implementors-list'>\
29032903
";
29042904

29052905
let mut synthetic_types = Vec::new();
@@ -3793,11 +3793,14 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
37933793
write!(w, "<h3 id='{}' class='impl'><span class='in-band'><table class='table-display'>\
37943794
<tbody><tr><td><code>", id)?;
37953795
fmt_impl_for_trait_page(&i.inner_impl(), w, use_absolute)?;
3796-
for it in &i.inner_impl().items {
3797-
if let clean::TypedefItem(ref tydef, _) = it.inner {
3798-
write!(w, "<span class=\"where fmt-newline\"> ")?;
3799-
assoc_type(w, it, &vec![], Some(&tydef.type_), AssocItemLink::Anchor(None))?;
3800-
write!(w, ";</span>")?;
3796+
if show_def_docs {
3797+
for it in &i.inner_impl().items {
3798+
if let clean::TypedefItem(ref tydef, _) = it.inner {
3799+
write!(w, "<span class=\"where fmt-newline\"> ")?;
3800+
assoc_type(w, it, &vec![], Some(&tydef.type_),
3801+
AssocItemLink::Anchor(None))?;
3802+
write!(w, ";</span>")?;
3803+
}
38013804
}
38023805
}
38033806
write!(w, "</code>")?;
@@ -3929,10 +3932,6 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
39293932
let traits = &cache().traits;
39303933
let trait_ = i.trait_did().map(|did| &traits[&did]);
39313934

3932-
if !show_def_docs {
3933-
write!(w, "<span class='docblock autohide'>")?;
3934-
}
3935-
39363935
write!(w, "<div class='impl-items'>")?;
39373936
for trait_item in &i.inner_impl().items {
39383937
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
39683967
}
39693968
write!(w, "</div>")?;
39703969

3971-
if !show_def_docs {
3972-
write!(w, "</span>")?;
3973-
}
3974-
39753970
Ok(())
39763971
}
39773972

0 commit comments

Comments
 (0)