mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Fix formatting, remove commented code, etc...
This commit is contained in:
parent
4b9cb857f9
commit
1cab0cbaf0
1 changed files with 7 additions and 15 deletions
|
@ -32,7 +32,7 @@ declare_clippy_lint! {
|
|||
/// ```
|
||||
/// Use instead:
|
||||
/// ```rust,ignore
|
||||
/// # #![feature(lint_reasons)]
|
||||
/// #![feature(lint_reasons)]
|
||||
/// #[expect(unused_mut)]
|
||||
/// fn foo() -> usize {
|
||||
/// let mut a = Vec::new();
|
||||
|
@ -61,18 +61,10 @@ impl LateLintPass<'_> for AllowAttribute {
|
|||
ALLOW_ATTRIBUTES,
|
||||
ident.span,
|
||||
"#[allow] attribute found",
|
||||
"replace it with", "expect".into()
|
||||
// format!("expect{}", snippet(
|
||||
// cx,
|
||||
// ident.span
|
||||
// .with_lo(
|
||||
// ident.span.hi() + BytePos(2) // Cut *(
|
||||
// )
|
||||
// .with_hi(
|
||||
// attr.meta().unwrap().span.hi() - BytePos(1) // Cut )
|
||||
// )
|
||||
// , "..."))
|
||||
, Applicability::MachineApplicable);
|
||||
"replace it with",
|
||||
"expect".into(),
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue