From 08519959c7b1d5ffb2c0381e692f6a9198599b8a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 10 May 2021 10:49:44 +0200 Subject: [PATCH] Update documentation for SharedContext::maybe_collapsed_doc_value --- src/librustdoc/html/render/context.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index e0c1fd06e7b6c..00f788d3ce2ea 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -135,8 +135,8 @@ impl SharedContext<'_> { Ok(()) } - /// Based on whether the `collapse-docs` pass was run, return either the `doc_value` or the - /// `collapsed_doc_value` of the given item. + /// Returns the `collapsed_doc_value` of the given item if this is the main crate, otherwise + /// returns the `doc_value`. crate fn maybe_collapsed_doc_value<'a>(&self, item: &'a clean::Item) -> Option { if self.collapsed { item.collapsed_doc_value() } else { item.doc_value() } }