Skip to content

Commit 0851995

Browse files
Update documentation for SharedContext::maybe_collapsed_doc_value
1 parent 00f2bf4 commit 0851995

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/render/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ impl SharedContext<'_> {
135135
Ok(())
136136
}
137137

138-
/// Based on whether the `collapse-docs` pass was run, return either the `doc_value` or the
139-
/// `collapsed_doc_value` of the given item.
138+
/// Returns the `collapsed_doc_value` of the given item if this is the main crate, otherwise
139+
/// returns the `doc_value`.
140140
crate fn maybe_collapsed_doc_value<'a>(&self, item: &'a clean::Item) -> Option<String> {
141141
if self.collapsed { item.collapsed_doc_value() } else { item.doc_value() }
142142
}

0 commit comments

Comments
 (0)