From ce6472987d2cb466345a857cb2efdd06307c5ebf Mon Sep 17 00:00:00 2001 From: Jacob Hoffman-Andrews Date: Thu, 3 Jun 2021 10:28:43 -0700 Subject: Remove methods under Implementors on trait pages These were hidden by default, and duplicated information already on the page anyhow. Also remove the "Auto-hide trait implementors of a trait" setting, which is not needed anymore. --- src/librustdoc/html/render/mod.rs | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'src/librustdoc/html/render') diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 0efa014b127..4f3acfb8e82 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -490,7 +490,6 @@ fn settings(root_path: &str, suffix: &str, themes: &[StylePath]) -> Result"); write!(w, "
"); @@ -1571,21 +1573,23 @@ fn render_impl( } } - if let Some(ref dox) = cx.shared.maybe_collapsed_doc_value(&i.impl_item) { - let mut ids = cx.id_map.borrow_mut(); - write!( - w, - "
{}
", - Markdown( - &*dox, - &i.impl_item.links(cx), - &mut ids, - cx.shared.codes, - cx.shared.edition(), - &cx.shared.playground - ) - .into_string() - ); + if !on_trait_page { + if let Some(ref dox) = cx.shared.maybe_collapsed_doc_value(&i.impl_item) { + let mut ids = cx.id_map.borrow_mut(); + write!( + w, + "
{}
", + Markdown( + &*dox, + &i.impl_item.links(cx), + &mut ids, + cx.shared.codes, + cx.shared.edition(), + &cx.shared.playground + ) + .into_string() + ); + } } } if !default_impl_items.is_empty() || !impl_items.is_empty() { -- cgit 1.4.1-3-g733a5