Skip to content

Commit 386fa4b

Browse files
committed
Fix formatting, remove commented code, etc...
1 parent 4b9cb85 commit 386fa4b

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

clippy_lints/src/allow_attributes.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_lint::{LateContext, LateLintPass};
66
use rustc_session::{declare_lint_pass, declare_tool_lint};
77

88
declare_clippy_lint! {
9-
/// Detects uses of the `#[allow]` attribute and suggests replacing it with
9+
/// Detects uses of the `#[allow]` attribute and suggests replacing it with
1010
/// the `#[expect]` (See [RFC 2383](https://rust-lang.github.io/rfcs/2383-lint-reasons.html))
1111
///
1212
/// The expect attribute is still unstable and requires the `lint_reasons`
@@ -61,18 +61,10 @@ impl LateLintPass<'_> for AllowAttribute {
6161
ALLOW_ATTRIBUTES,
6262
ident.span,
6363
"#[allow] attribute found",
64-
"replace it with", "expect".into()
65-
// format!("expect{}", snippet(
66-
// cx,
67-
// ident.span
68-
// .with_lo(
69-
// ident.span.hi() + BytePos(2) // Cut *(
70-
// )
71-
// .with_hi(
72-
// attr.meta().unwrap().span.hi() - BytePos(1) // Cut )
73-
// )
74-
// , "..."))
75-
, Applicability::MachineApplicable);
64+
"replace it with",
65+
"expect".into(),
66+
Applicability::MachineApplicable
67+
);
7668
}
7769
}
7870
}

0 commit comments

Comments
 (0)