1 // Copyright 2015 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 #![deny(unused_extern_crates)]
14 #![feature(alloc, test, libc, crate_visibility_modifier)]
17 //~^ ERROR unused extern crate
19 extern crate libc as x;
20 //~^ ERROR unused extern crate
23 extern crate proc_macro;
28 pub extern crate test as y;
30 pub extern crate alloc;
32 pub(crate) extern crate alloc as a;
34 crate extern crate alloc as b;
37 pub(in crate::foo) extern crate alloc as c;
39 pub(super) extern crate alloc as d;
42 //~^ ERROR unused extern crate
45 extern crate libc as x;
46 //~^ ERROR unused extern crate
49 pub extern crate test;
51 pub extern crate test as y;
55 //~^ ERROR unused extern crate
58 extern crate libc as x;
59 //~^ ERROR unused extern crate
62 pub(in crate::foo::bar) extern crate alloc as e;
65 e::string::String::new();
70 c::string::String::new();
71 d::string::String::new();
77 a::string::String::new();
78 b::string::String::new();
80 proc_macro::TokenStream::new();