This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -10,20 +10,19 @@ use rustc_session::declare_lint_pass;
10
10
declare_clippy_lint ! {
11
11
/// ### What it does
12
12
/// 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))
14
14
///
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
16
16
/// on nightly. It can be enabled by adding `#![feature(lint_reasons)]` to
17
17
/// the crate root.
18
18
///
19
- /// This lint only warns outer attributes (`#[allow]`), as inner attributes
19
+ /// This lint only warns on outer attributes (`#[allow]`), as inner attributes
20
20
/// (`#![allow]`) are usually used to enable or disable lints on a global scale.
21
21
///
22
22
/// ### 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.
27
26
///
28
27
/// ### Example
29
28
/// ```rust,ignore
You can’t perform that action at this time.
0 commit comments