1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 #![feature(underscore_imports)]
14 #![warn(unused_imports, unused_extern_crates)]
20 fn tr1_is_in_scope(&self) {}
23 fn tr2_is_in_scope(&self) {}
31 use m::Tr1 as _; //~ WARN unused import
32 use S as _; //~ WARN unused import
33 extern crate core as _; // OK
39 pub use m::Tr2 as _; // OK, no name conflict
40 struct Tr1; // OK, no name conflict
42 // Both traits are in scope
43 ::S.tr1_is_in_scope();
44 ::S.tr2_is_in_scope();
48 // `_` imports are fetched by glob imports
51 // Both traits are in scope
52 ::S.tr1_is_in_scope();
53 ::S.tr2_is_in_scope();
58 // `_` imports are fetched by glob imports
61 // Both traits are in scope
62 ::S.tr1_is_in_scope();
63 ::S.tr2_is_in_scope();