From 41a0f8c72f3e9d439329ca7e3ccd9ae98b92bb23 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 15 Feb 2022 11:46:52 +0100 Subject: [PATCH 1/2] Clean up rustdoc command line args doc --- src/doc/rustdoc/src/command-line-arguments.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index 9de2e733de7c7..7b7e1a076467b 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -381,7 +381,7 @@ the same CSS rules as the official `light` theme. `--check-theme` flag, it discards all other flags and only performs the CSS rule comparison operation. -### `--crate-version`: control the crate version +## `--crate-version`: control the crate version Using this flag looks like this: @@ -418,6 +418,8 @@ Rustdoc only supports Rust source code and Markdown input formats. If the file ends in `.md` or `.markdown`, `rustdoc` treats it as a Markdown file. Otherwise, it assumes that the input file is Rust. +# Unstable command line arguments + ## `--nocapture` When this flag is used with `--test`, the output (stdout and stderr) of your tests won't be From 590ca7e756b75d91f631ca2a4a1fbce0cb788f5e Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 15 Feb 2022 11:48:41 +0100 Subject: [PATCH 2/2] Add documentation for rustdoc --check option --- src/doc/rustdoc/src/command-line-arguments.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md index 7b7e1a076467b..3ce57f88938f7 100644 --- a/src/doc/rustdoc/src/command-line-arguments.md +++ b/src/doc/rustdoc/src/command-line-arguments.md @@ -426,3 +426,14 @@ When this flag is used with `--test`, the output (stdout and stderr) of your tes captured by rustdoc. Instead, the output will be directed to your terminal, as if you had run the test executable manually. This is especially useful for debugging your tests! + +## `--check` + +When this flag is supplied, rustdoc will type check and lint your code, but will not generate any +documentation or run your doctests. + +Using this flag looks like: + +```bash +rustdoc -Z unstable-options --check src/lib.rs +```