ignore redundant_pub_crate in useless_attribute
This commit is contained in:
parent
cef882cc9d
commit
0c164bbfdb
4 changed files with 19 additions and 8 deletions
|
|
@ -57,6 +57,12 @@ pub use std::io::prelude::*;
|
|||
#[allow(clippy::enum_glob_use)]
|
||||
pub use std::cmp::Ordering::*;
|
||||
|
||||
// don't lint on clippy::redundant_pub_crate
|
||||
mod c {
|
||||
#[allow(clippy::redundant_pub_crate)]
|
||||
pub(crate) struct S;
|
||||
}
|
||||
|
||||
fn test_indented_attr() {
|
||||
#![allow(clippy::almost_swapped)]
|
||||
use std::collections::HashSet;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,12 @@ pub use std::io::prelude::*;
|
|||
#[allow(clippy::enum_glob_use)]
|
||||
pub use std::cmp::Ordering::*;
|
||||
|
||||
// don't lint on clippy::redundant_pub_crate
|
||||
mod c {
|
||||
#[allow(clippy::redundant_pub_crate)]
|
||||
pub(crate) struct S;
|
||||
}
|
||||
|
||||
fn test_indented_attr() {
|
||||
#[allow(clippy::almost_swapped)]
|
||||
use std::collections::HashSet;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ LL | #[cfg_attr(feature = "cargo-clippy", allow(dead_code))]
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![cfg_attr(feature = "cargo-clippy", allow(dead_code)`
|
||||
|
||||
error: useless lint attribute
|
||||
--> $DIR/useless_attribute.rs:61:5
|
||||
--> $DIR/useless_attribute.rs:67:5
|
||||
|
|
||||
LL | #[allow(clippy::almost_swapped)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(clippy::almost_swapped)]`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue