2 // aux-build:underscore-imports.rs
4 #![warn(unused_imports, unused_extern_crates)]
7 extern crate underscore_imports as _;
15 fn tr1_is_in_scope(&self) {}
18 fn tr2_is_in_scope(&self) {}
26 use m::Tr1 as _; //~ WARN unused import
27 use S as _; //~ WARN unused import
28 extern crate core as _; // OK
34 pub use m::Tr2 as _; // OK, no name conflict
35 struct Tr1; // OK, no name conflict
37 // Both traits are in scope
38 ::S.tr1_is_in_scope();
39 ::S.tr2_is_in_scope();
43 // `_` imports are fetched by glob imports
46 // Both traits are in scope
47 ::S.tr1_is_in_scope();
48 ::S.tr2_is_in_scope();
53 // `_` imports are fetched by glob imports
56 // Both traits are in scope
57 ::S.tr1_is_in_scope();
58 ::S.tr2_is_in_scope();