Remove unused collapse pass

This commit is contained in:
Guillaume Gomez 2020-12-26 14:22:08 +01:00
parent 4ba1928fa2
commit d0e7523a32
3 changed files with 3 additions and 19 deletions

View File

@ -623,6 +623,9 @@ crate fn run_global_ctxt(
ctxt.sess().abort_if_errors();
// The main crate doc comments are always collapsed.
krate.collapsed = true;
(krate, ctxt.renderinfo.into_inner(), ctxt.render_options)
}

View File

@ -1,14 +0,0 @@
use crate::clean;
use crate::core::DocContext;
use crate::passes::Pass;
crate const COLLAPSE_DOCS: Pass = Pass {
name: "collapse-docs",
run: collapse_docs,
description: "concatenates all document attributes into one document attribute",
};
crate fn collapse_docs(mut krate: clean::Crate, _: &DocContext<'_>) -> clean::Crate {
krate.collapsed = true;
krate
}

View File

@ -14,9 +14,6 @@ crate use stripper::*;
mod non_autolinks;
crate use self::non_autolinks::CHECK_NON_AUTOLINKS;
mod collapse_docs;
crate use self::collapse_docs::COLLAPSE_DOCS;
mod strip_hidden;
crate use self::strip_hidden::STRIP_HIDDEN;
@ -84,7 +81,6 @@ crate const PASSES: &[Pass] = &[
CHECK_PRIVATE_ITEMS_DOC_TESTS,
STRIP_HIDDEN,
UNINDENT_COMMENTS,
COLLAPSE_DOCS,
STRIP_PRIVATE,
STRIP_PRIV_IMPORTS,
PROPAGATE_DOC_CFG,
@ -99,7 +95,6 @@ crate const PASSES: &[Pass] = &[
/// The list of passes run by default.
crate const DEFAULT_PASSES: &[ConditionalPass] = &[
ConditionalPass::always(COLLECT_TRAIT_IMPLS),
ConditionalPass::always(COLLAPSE_DOCS),
ConditionalPass::always(UNINDENT_COMMENTS),
ConditionalPass::always(CHECK_PRIVATE_ITEMS_DOC_TESTS),
ConditionalPass::new(STRIP_HIDDEN, WhenNotDocumentHidden),