Skip to content

Commit 249ed26

Browse files
Rollup merge of #85141 - GuillaumeGomez:maybe_collapsed_doc_value-doc, r=jsha
Update documentation for SharedContext::maybe_collapsed_doc_value Fixes #85120. The `doc-collapse` was removed, however, the main crate is always "collapsed", meaning that this function is still needed. I updated the documentation instead to avoid misleading readers. r? `@jsha`
2 parents 90f6fe8 + 0851995 commit 249ed26

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
@@ -137,8 +137,8 @@ impl SharedContext<'_> {
137137
Ok(())
138138
}
139139

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

0 commit comments

Comments
 (0)