From 4d23c8e9a162a91c4e25f75285353be938ea1f25 Mon Sep 17 00:00:00 2001 From: Alan Egerton Date: Tue, 6 Apr 2021 02:09:43 +0100 Subject: Add listing of lints (eg via -W help) to rustdoc --- src/test/rustdoc-ui/issue-83883-describe-lints.rs | 8 +++++++ .../rustdoc-ui/issue-83883-describe-lints.stdout | 25 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 src/test/rustdoc-ui/issue-83883-describe-lints.rs create mode 100644 src/test/rustdoc-ui/issue-83883-describe-lints.stdout (limited to 'src/test/rustdoc-ui') 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 Warn about + -A Allow + -D Deny + -F Forbid (deny 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 + + -- cgit 1.4.1-3-g733a5