about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-16 18:59:30 +0100
committerGitHub <noreply@github.com>2022-02-16 18:59:30 +0100
commit75a631d4ba6bc1043a6eb0d4807dbceff316a354 (patch)
tree45c82d5af847a9448cf2bcfc64377db19639acbd
parent9a4212113592e83fb68ef9f347436d0d13517c1d (diff)
parent590ca7e756b75d91f631ca2a4a1fbce0cb788f5e (diff)
downloadrust-75a631d4ba6bc1043a6eb0d4807dbceff316a354.tar.gz
rust-75a631d4ba6bc1043a6eb0d4807dbceff316a354.zip
Rollup merge of #94015 - GuillaumeGomez:check-option, r=notriddle
rustdoc --check option documentation

Part of #92763.

r? ```@notriddle```
-rw-r--r--src/doc/rustdoc/src/command-line-arguments.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/doc/rustdoc/src/command-line-arguments.md b/src/doc/rustdoc/src/command-line-arguments.md
index 9de2e733de7..3ce57f88938 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,9 +418,22 @@ 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
 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
+```