Skip to content

Commit 35d284f

Browse files
committed
[ allow_attributes ]: fix doc nits
1 parent 7ab4af3 commit 35d284f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

clippy_lints/src/allow_attributes.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@ use rustc_session::declare_lint_pass;
1010
declare_clippy_lint! {
1111
/// ### What it does
1212
/// Checks for usage of the `#[allow]` attribute and suggests replacing it with
13-
/// the `#[expect]` (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
13+
/// `#[expect]`. (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
1414
///
15-
/// The expect attribute is still unstable and requires the `lint_reasons`
15+
/// The expect attribute is still unstable and requires the `lint_reasons` feature
1616
/// on nightly. It can be enabled by adding `#![feature(lint_reasons)]` to
1717
/// the crate root.
1818
///
19-
/// This lint only warns outer attributes (`#[allow]`), as inner attributes
19+
/// This lint only warns on outer attributes (`#[allow]`), as inner attributes
2020
/// (`#![allow]`) are usually used to enable or disable lints on a global scale.
2121
///
2222
/// ### Why restrict this?
23-
/// `#[allow]` attributes can linger after their reason for existence is gone.
24-
/// `#[expect]` attributes suppress the lint emission, but emit a warning if
25-
/// the expectation is unfulfilled. This can be useful to be notified when the
26-
/// lint is no longer triggered, which may indicate the attribute can be removed.
23+
/// The `#[allow]` attribute does not warn when the expected lint is no longer triggered,
24+
/// whereas `#[expect]` calls attention to this fact. This can be a useful reminder to
25+
/// remove attributes that are no longer needed.
2726
///
2827
/// ### Example
2928
/// ```rust,ignore

0 commit comments

Comments
 (0)