summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/useless_attribute.fixed
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tools/clippy/tests/ui/useless_attribute.fixed21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/tools/clippy/tests/ui/useless_attribute.fixed b/src/tools/clippy/tests/ui/useless_attribute.fixed
index c23231a99..871e4fb5c 100644
--- a/src/tools/clippy/tests/ui/useless_attribute.fixed
+++ b/src/tools/clippy/tests/ui/useless_attribute.fixed
@@ -1,6 +1,7 @@
// run-rustfix
// aux-build:proc_macro_derive.rs
+#![allow(unused)]
#![warn(clippy::useless_attribute)]
#![warn(unreachable_pub)]
#![feature(rustc_private)]
@@ -16,6 +17,13 @@ extern crate rustc_middle;
#[macro_use]
extern crate proc_macro_derive;
+fn test_indented_attr() {
+ #![allow(clippy::almost_swapped)]
+ use std::collections::HashSet;
+
+ let _ = HashSet::<u32>::default();
+}
+
// don't lint on unused_import for `use` items
#[allow(unused_imports)]
use std::collections;
@@ -63,13 +71,16 @@ mod c {
pub(crate) struct S;
}
-fn test_indented_attr() {
- #![allow(clippy::almost_swapped)]
- use std::collections::HashSet;
-
- let _ = HashSet::<u32>::default();
+// https://github.com/rust-lang/rust-clippy/issues/7511
+pub mod split {
+ #[allow(clippy::module_name_repetitions)]
+ pub use regex::SplitN;
}
+// https://github.com/rust-lang/rust-clippy/issues/8768
+#[allow(clippy::single_component_path_imports)]
+use regex;
+
fn main() {
test_indented_attr();
}