diff options
| author | Wim Looman <git@nemo157.com> | 2022-09-12 20:10:35 +0200 | 
|---|---|---|
| committer | Wim Looman <git@nemo157.com> | 2022-09-12 21:20:24 +0200 | 
| commit | 72cf46aa72b79e044b08b70e5dd9e56e3ef21f89 (patch) | |
| tree | 10bf2770c8b29c57d889c8dc020267de46057968 /src/librustdoc/lint.rs | |
| parent | fd1a399c4f3d0510b0c7528a298bc597d113856d (diff) | |
| download | rust-72cf46aa72b79e044b08b70e5dd9e56e3ef21f89.tar.gz rust-72cf46aa72b79e044b08b70e5dd9e56e3ef21f89.zip | |
Feature gate the rustdoc::missing_doc_code_examples lint
Diffstat (limited to 'src/librustdoc/lint.rs')
| -rw-r--r-- | src/librustdoc/lint.rs | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/src/librustdoc/lint.rs b/src/librustdoc/lint.rs index 240aec52cff..e76c19a61c5 100644 --- a/src/librustdoc/lint.rs +++ b/src/librustdoc/lint.rs @@ -64,9 +64,13 @@ where } macro_rules! declare_rustdoc_lint { - ($(#[$attr:meta])* $name: ident, $level: ident, $descr: literal $(,)?) => { + ( + $(#[$attr:meta])* $name: ident, $level: ident, $descr: literal $(,)? + $(@feature_gate = $gate:expr;)? + ) => { declare_tool_lint! { $(#[$attr])* pub rustdoc::$name, $level, $descr + $(, @feature_gate = $gate;)? } } } @@ -123,7 +127,8 @@ declare_rustdoc_lint! { /// [rustdoc book]: ../../../rustdoc/lints.html#missing_doc_code_examples MISSING_DOC_CODE_EXAMPLES, Allow, - "detects publicly-exported items without code samples in their documentation" + "detects publicly-exported items without code samples in their documentation", + @feature_gate = rustc_span::symbol::sym::rustdoc_missing_doc_code_examples; } declare_rustdoc_lint! { | 
