2 // aux-build:proc_macro_derive.rs
4 #![warn(clippy::useless_attribute)]
5 #![warn(unreachable_pub)]
6 #![feature(rustc_private)]
9 #![cfg_attr(feature = "cargo-clippy", allow(dead_code))]
11 #[allow(unused_imports)]
12 #[allow(unused_extern_crates)]
14 extern crate rustc_middle;
17 extern crate proc_macro_derive;
19 // don't lint on unused_import for `use` items
20 #[allow(unused_imports)]
23 // don't lint on unused for `use` items
27 // don't lint on deprecated for `use` items
35 // This should not trigger the lint. There's lint level definitions inside the external derive
36 // that would trigger the useless_attribute lint.
37 #[derive(DeriveSomething)]
40 // don't lint on unreachable_pub for `use` items
44 #[allow(unreachable_pub)]
48 #[allow(unreachable_pub)]
52 // don't lint on clippy::wildcard_imports for `use` items
53 #[allow(clippy::wildcard_imports)]
54 pub use std::io::prelude::*;
56 // don't lint on clippy::enum_glob_use for `use` items
57 #[allow(clippy::enum_glob_use)]
58 pub use std::cmp::Ordering::*;
60 fn test_indented_attr() {
61 #![allow(clippy::almost_swapped)]
62 use std::collections::HashSet;
64 let _ = HashSet::<u32>::default();