about summary refs log tree commit diff
path: root/src/librustdoc/html/render/context.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-12-19 10:45:55 +0100
committerGitHub <noreply@github.com>2021-12-19 10:45:55 +0100
commit1f080f64ee0e09a56b73f0fd55d49fa2afd3eeb5 (patch)
treec8d6261e269a3fa38c55b03da9c93e06d412238a /src/librustdoc/html/render/context.rs
parent690d6b0958cdc7c06f23d57deedd21010810af96 (diff)
parentdea1c6861409b06d2e3f4ebfb46af908a1b3ae29 (diff)
Rollup merge of #92077 - jyn514:remove-collapsed, r=GuillaumeGomez
rustdoc: Remove unused `collapsed` field

`render/context` always runs after `run_global_context`, so it was always set to `true`.

This is a holdover from when rustdoc allowed configuring passes, but the `collapse-docs` pass was
removed ages ago, and the ability to configure passes is about to be removed.

Found while reviewing https://github.com/rust-lang/rust/pull/91305.
Diffstat (limited to 'src/librustdoc/html/render/context.rs')
-rw-r--r--src/librustdoc/html/render/context.rs9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs
index 365d959ad9f..6f190dbf66b 100644
--- a/src/librustdoc/html/render/context.rs
+++ b/src/librustdoc/html/render/context.rs
@@ -88,8 +88,6 @@ crate struct SharedContext<'tcx> {
     crate local_sources: FxHashMap<PathBuf, String>,
     /// Show the memory layout of types in the docs.
     pub(super) show_type_layout: bool,
-    /// Whether the collapsed pass ran
-    collapsed: bool,
     /// The base-URL of the issue tracker for when an item has been tagged with
     /// an issue number.
     pub(super) issue_tracker_base_url: Option<String>,
@@ -142,12 +140,6 @@ impl SharedContext<'_> {
         Ok(())
     }
 
-    /// 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() }
-    }
-
     crate fn edition(&self) -> Edition {
         self.tcx.sess.edition()
     }
@@ -472,7 +464,6 @@ impl<'tcx> FormatRenderer<'tcx> for Context<'tcx> {
         let (sender, receiver) = channel();
         let mut scx = SharedContext {
             tcx,
-            collapsed: krate.collapsed,
             src_root,
             local_sources,
             issue_tracker_base_url,