Skip to content

Commit 6f32e3e

Browse files
Add new edition 2021 link: INVALID_DOC_ATTRIBUTE
1 parent 4099208 commit 6f32e3e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

compiler/rustc_lint_defs/src/builtin.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3059,3 +3059,30 @@ declare_lint! {
30593059
Allow,
30603060
"No declared ABI for extern declaration"
30613061
}
3062+
3063+
declare_lint! {
3064+
/// The `invalid_doc_attributes` lint detects when the `#[doc(...)]` is
3065+
/// misused.
3066+
///
3067+
/// ### Example
3068+
///
3069+
/// ```rust,compile_fail
3070+
/// #![deny(warnings)]
3071+
/// #[doc(test(no_crate_inject))]
3072+
/// ```
3073+
///
3074+
/// {{produces}}
3075+
///
3076+
/// ### Explanation
3077+
///
3078+
/// Previously, there were very like checks being performed on `#[doc(..)]`
3079+
/// unlike the other attributes. It'll now catch all the issues that it
3080+
/// silently ignored previously.
3081+
pub INVALID_DOC_ATTRIBUTE,
3082+
Warn,
3083+
"detects invalid `#[doc(...)]` attributes",
3084+
@future_incompatible = FutureIncompatibleInfo {
3085+
reference: "issue #82730 <https://github.com/rust-lang/rust/issues/82730>",
3086+
edition: Some(Edition::Edition2021),
3087+
};
3088+
}

0 commit comments

Comments
 (0)