diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-10 10:49:44 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-05-10 10:49:44 +0200 |
| commit | 08519959c7b1d5ffb2c0381e692f6a9198599b8a (patch) | |
| tree | ee9fd9c186a939f72b83b0bdf625c8b50df85d68 /src/librustdoc/html | |
| parent | 00f2bf40d6374ec3541a72edb5b481fb1370dbca (diff) | |
| download | rust-08519959c7b1d5ffb2c0381e692f6a9198599b8a.tar.gz rust-08519959c7b1d5ffb2c0381e692f6a9198599b8a.zip | |
Update documentation for SharedContext::maybe_collapsed_doc_value
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index e0c1fd06e7b..00f788d3ce2 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<String> { if self.collapsed { item.collapsed_doc_value() } else { item.doc_value() } } |
