about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Arundel <john@bitfieldconsulting.com>2024-06-03 12:36:01 +0100
committerJohn Arundel <john@bitfieldconsulting.com>2024-06-06 12:45:32 +0100
commit35d284fcbf947089315beccb6d1af7396d09d5d3 (patch)
treeb52688d8103a5cb4a415da54828522efadb37eae
parent7ab4af336cdb8b13cb39e192913f84e8b7f30dda (diff)
downloadrust-35d284fcbf947089315beccb6d1af7396d09d5d3.tar.gz
rust-35d284fcbf947089315beccb6d1af7396d09d5d3.zip
[ allow_attributes ]: fix doc nits
-rw-r--r--clippy_lints/src/allow_attributes.rs13
1 files changed, 6 insertions, 7 deletions
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 @@ use rustc_session::declare_lint_pass;
 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