Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a256f06

Browse files
committed
doc: add '--document-private-items' to cargo xtask doc
1 parent c2d026d commit a256f06

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎xtask/src/cargo.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ impl Cargo {
198198
if self.warnings_as_errors {
199199
cmd.env("RUSTDOCFLAGS", "-Dwarnings");
200200
}
201+
// We do not publicly do this on docs.rs but this helps us to prevent illegal
202+
// intra-doc links and other rustdoc errors in the documentation of private items.
203+
extra_args.push("--document-private-items");
201204
if open {
202205
extra_args.push("--open");
203206
}
@@ -293,7 +296,7 @@ mod tests {
293296
};
294297
assert_eq!(
295298
command_to_string(&cargo.command().unwrap()),
296-
"RUSTDOCFLAGS=-Dwarnings cargo doc --package uefi --package xtask --features alloc --open"
299+
"RUSTDOCFLAGS=-Dwarnings cargo doc --package uefi --package xtask --features alloc --document-private-items --open"
297300
);
298301
}
299302
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /