The comment says that only stage 0 or stage 2 rustdoc is used, but the user can simply request stage 1 rustdoc.
|
#[derive(Debug, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)] |
|
pub struct Rustdoc { |
|
/// This should only ever be 0 or 2. |
|
/// We sometimes want to reference the "bootstrap" rustdoc, which is why this option is here. |
|
pub compiler: Compiler, |
|
} |
tested by putting assert_ne!(self.compiler.stage, 1) in Rustdoc::run, then running ./x doc --stage 1 library/core, which causes the added assertion to fail.
The comment says that only stage 0 or stage 2 rustdoc is used, but the user can simply request stage 1 rustdoc.
rust/src/bootstrap/src/core/build_steps/tool.rs
Lines 667 to 672 in 8de4c72
tested by putting
assert_ne!(self.compiler.stage, 1)inRustdoc::run, then running./x doc --stage 1 library/core, which causes the added assertion to fail.