diff options
| author | Taiki Endo <te316e89@gmail.com> | 2020-09-01 12:09:32 +0900 |
|---|---|---|
| committer | Taiki Endo <te316e89@gmail.com> | 2020-09-01 12:09:32 +0900 |
| commit | 2e4b4cebbbb37efa5dc69dd2616f3b7a288b92aa (patch) | |
| tree | f2a4eaea3cc744eb2fe956d8fdc1e4b1a985f8e0 /tests | |
| parent | 001c1c51d2d4b6964a2f0c0c5936bfaacf49a585 (diff) | |
| download | rust-2e4b4cebbbb37efa5dc69dd2616f3b7a288b92aa.tar.gz rust-2e4b4cebbbb37efa5dc69dd2616f3b7a288b92aa.zip | |
useless_attribute: Permit wildcard_imports and enum_glob_use
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/useless_attribute.fixed | 8 | ||||
| -rw-r--r-- | tests/ui/useless_attribute.rs | 8 | ||||
| -rw-r--r-- | tests/ui/useless_attribute.stderr | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/tests/ui/useless_attribute.fixed b/tests/ui/useless_attribute.fixed index b222e2f7976..a5fcde768f1 100644 --- a/tests/ui/useless_attribute.fixed +++ b/tests/ui/useless_attribute.fixed @@ -49,6 +49,14 @@ mod a { pub use self::b::C; } +// don't lint on clippy::wildcard_imports for `use` items +#[allow(clippy::wildcard_imports)] +pub use std::io::prelude::*; + +// don't lint on clippy::enum_glob_use for `use` items +#[allow(clippy::enum_glob_use)] +pub use std::cmp::Ordering::*; + fn test_indented_attr() { #![allow(clippy::almost_swapped)] use std::collections::HashSet; diff --git a/tests/ui/useless_attribute.rs b/tests/ui/useless_attribute.rs index 3422eace4ab..0396d39e3d5 100644 --- a/tests/ui/useless_attribute.rs +++ b/tests/ui/useless_attribute.rs @@ -49,6 +49,14 @@ mod a { pub use self::b::C; } +// don't lint on clippy::wildcard_imports for `use` items +#[allow(clippy::wildcard_imports)] +pub use std::io::prelude::*; + +// don't lint on clippy::enum_glob_use for `use` items +#[allow(clippy::enum_glob_use)] +pub use std::cmp::Ordering::*; + fn test_indented_attr() { #[allow(clippy::almost_swapped)] use std::collections::HashSet; diff --git a/tests/ui/useless_attribute.stderr b/tests/ui/useless_attribute.stderr index 57ba976730c..d0194e4bbbe 100644 --- a/tests/ui/useless_attribute.stderr +++ b/tests/ui/useless_attribute.stderr @@ -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:53:5 + --> $DIR/useless_attribute.rs:61:5 | LL | #[allow(clippy::almost_swapped)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: if you just forgot a `!`, use: `#![allow(clippy::almost_swapped)]` |
