diff options
| author | Alan Egerton <eggyal@gmail.com> | 2021-04-06 02:09:43 +0100 |
|---|---|---|
| committer | Alan Egerton <eggyal@gmail.com> | 2021-04-06 09:54:56 +0100 |
| commit | 4d23c8e9a162a91c4e25f75285353be938ea1f25 (patch) | |
| tree | 20b7df9c30c9308015efa7de4609734032209ed2 /src/test/rustdoc-ui | |
| parent | d32238532138485c80db4f2cd596372bce214e00 (diff) | |
| download | rust-4d23c8e9a162a91c4e25f75285353be938ea1f25.tar.gz rust-4d23c8e9a162a91c4e25f75285353be938ea1f25.zip | |
Add listing of lints (eg via -W help) to rustdoc
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/issue-83883-describe-lints.rs | 8 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/issue-83883-describe-lints.stdout | 25 |
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/issue-83883-describe-lints.rs b/src/test/rustdoc-ui/issue-83883-describe-lints.rs new file mode 100644 index 00000000000..a261b782d48 --- /dev/null +++ b/src/test/rustdoc-ui/issue-83883-describe-lints.rs @@ -0,0 +1,8 @@ +// compile-flags: -W help +// check-pass +// +// ignore-tidy-linelength +// +// normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS" +// normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS" +// normalize-stdout-test: " +rustdoc::all( (rustdoc::[[:word:]-]+, )*rustdoc::[[:word:]-]+)?" -> " rustdoc::all $$GROUPS$4" diff --git a/src/test/rustdoc-ui/issue-83883-describe-lints.stdout b/src/test/rustdoc-ui/issue-83883-describe-lints.stdout new file mode 100644 index 00000000000..651faf5761f --- /dev/null +++ b/src/test/rustdoc-ui/issue-83883-describe-lints.stdout @@ -0,0 +1,25 @@ + +Available lint options: + -W <foo> Warn about <foo> + -A <foo> Allow <foo> + -D <foo> Deny <foo> + -F <foo> Forbid <foo> (deny <foo> and all attempts to override) + + +Lint checks provided by rustc: + + $NAMES $LEVELS $MEANINGS + +Lint groups provided by rustc: + + $NAMES $SUB_LINTS + +Lint checks provided by plugins loaded by this crate: + + $NAMES $LEVELS $MEANINGS + +Lint groups provided by plugins loaded by this crate: + + rustdoc::all $GROUPS + + |
