Skip to content

Commit

Permalink
Add new edition 2021 link: INVALID_DOC_ATTRIBUTE
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 4, 2021
1 parent 4099208 commit 6f32e3e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions compiler/rustc_lint_defs/src/builtin.rs
Expand Up @@ -3059,3 +3059,30 @@ declare_lint! {
Allow,
"No declared ABI for extern declaration"
}

declare_lint! {
/// The `invalid_doc_attributes` lint detects when the `#[doc(...)]` is
/// misused.
///
/// ### Example
///
/// ```rust,compile_fail
/// #![deny(warnings)]
/// #[doc(test(no_crate_inject))]
/// ```
///
/// {{produces}}
///
/// ### Explanation
///
/// Previously, there were very like checks being performed on `#[doc(..)]`
/// unlike the other attributes. It'll now catch all the issues that it
/// silently ignored previously.
pub INVALID_DOC_ATTRIBUTE,
Warn,
"detects invalid `#[doc(...)]` attributes",
@future_incompatible = FutureIncompatibleInfo {
reference: "issue #82730 <https://github.com/rust-lang/rust/issues/82730>",
edition: Some(Edition::Edition2021),
};
}

0 comments on commit 6f32e3e

Please sign in to comment.