Module rustdoc::passes

source ·
Expand description

Contains information about “passes”, used to modify crate information during the documentation process.


  • Calculates information used for the –show-coverage flag.
  • NIGHTLY & UNSTABLE CHECK: custom_code_classes_in_docs
  • Looks for items missing (or incorrectly having) doctests.
  • This module implements RFC 1946: Intra-rustdoc-links
  • Collects trait impls for each item in the crate. For example, if a crate defines a struct that implements a trait, this pass will note that the struct implements that trait.
  • lint 🔒
    Runs several rustdoc lints, consolidating them into a single pass for efficiency and simplicity.
  • Propagates #[doc(cfg(...))] to child items.
  • Strip all doc(hidden) items from the output.
  • Strips all private import statements (use, extern crate) from a crate.
  • Strip all private items from the output. Additionally implies strip_priv_imports. Basically, the goal is to remove items that are not relevant for public documentation.
  • stripper 🔒
    A collection of utility functions for the strip_* passes.


  • In a list of passes, a pass that may or may not need to be run depending on options.
  • Pass 🔒
    A single pass over the cleaned documentation.


  • Condition 🔒
    How to decide whether to run a conditional pass.


  • The list of default passes run when --doc-coverage is passed to rustdoc.
  • The list of passes run by default.
  • PASSES 🔒
    The full list of passes.


  • defaults 🔒
    Returns the given default set of passes.