Skip to content

Commit

Permalink
Document rustdoc with --document-private-items
Browse files Browse the repository at this point in the history
  • Loading branch information
Stupremee committed Jul 7, 2021
1 parent d04ec47 commit 27b55e6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ impl Step for Rustc {
}

macro_rules! tool_doc {
($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?] $(, binary=$bin:expr)?) => {
($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?], binary=$bin:expr) => {
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct $tool {
stage: u32,
Expand Down Expand Up @@ -669,9 +669,9 @@ macro_rules! tool_doc {
cargo.arg("-p").arg($krate);
)+

$(if !$bin {
if !$bin {
cargo.rustdocflag("--document-private-items");
})?
}
cargo.rustdocflag("--enable-index-page");
cargo.rustdocflag("--show-type-layout");
cargo.rustdocflag("-Zunstable-options");
Expand All @@ -681,7 +681,13 @@ macro_rules! tool_doc {
}
}

tool_doc!(Rustdoc, "rustdoc-tool", "src/tools/rustdoc", ["rustdoc", "rustdoc-json-types"]);
tool_doc!(
Rustdoc,
"rustdoc-tool",
"src/tools/rustdoc",
["rustdoc", "rustdoc-json-types"],
binary = false
);
tool_doc!(
Rustfmt,
"rustfmt-nightly",
Expand Down

0 comments on commit 27b55e6

Please sign in to comment.