diff --git a/clippy_lints/src/allow_attributes.rs b/clippy_lints/src/allow_attributes.rs index 123d0e51eee..990f724ab9d 100644 --- a/clippy_lints/src/allow_attributes.rs +++ b/clippy_lints/src/allow_attributes.rs @@ -10,20 +10,19 @@ declare_clippy_lint! { /// ### What it does /// Checks for usage of the `#[allow]` attribute and suggests replacing it with - /// the `#[expect]` (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html)) + /// `#[expect]`. (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html)) /// - /// The expect attribute is still unstable and requires the `lint_reasons` + /// The expect attribute is still unstable and requires the `lint_reasons` feature /// on nightly. It can be enabled by adding `#![feature(lint_reasons)]` to /// the crate root. /// - /// This lint only warns outer attributes (`#[allow]`), as inner attributes + /// This lint only warns on outer attributes (`#[allow]`), as inner attributes /// (`#![allow]`) are usually used to enable or disable lints on a global scale. /// /// ### Why restrict this? - /// `#[allow]` attributes can linger after their reason for existence is gone. - /// `#[expect]` attributes suppress the lint emission, but emit a warning if - /// the expectation is unfulfilled. This can be useful to be notified when the - /// lint is no longer triggered, which may indicate the attribute can be removed. + /// The `#[allow]` attribute does not warn when the expected lint is no longer triggered, + /// whereas `#[expect]` calls attention to this fact. This can be a useful reminder to + /// remove attributes that are no longer needed. /// /// ### Example /// ```rust,ignore