]>
Commit | Line | Data |
---|---|---|
9cc50fc6 SL |
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. | |
4 | // | |
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. | |
10 | ||
5bcae85e | 11 | #![deny(private_in_public)] |
9cc50fc6 SL |
12 | #![allow(dead_code)] |
13 | ||
7453a54e | 14 | extern crate core; |
5bcae85e | 15 | pub use core as reexported_core; //~ ERROR extern crate `core` is private, and cannot be reexported |
7453a54e SL |
16 | //~^ WARNING hard error |
17 | ||
9cc50fc6 | 18 | mod m1 { |
5bcae85e | 19 | pub use ::E::V; //~ ERROR variant `V` is private, and cannot be reexported |
9cc50fc6 SL |
20 | //~^ WARNING hard error |
21 | } | |
22 | ||
23 | mod m2 { | |
5bcae85e | 24 | pub use ::E::{V}; //~ ERROR variant `V` is private, and cannot be reexported |
9cc50fc6 SL |
25 | //~^ WARNING hard error |
26 | } | |
27 | ||
28 | mod m3 { | |
5bcae85e | 29 | pub use ::E::V::{self}; //~ ERROR variant `V` is private, and cannot be reexported |
9cc50fc6 SL |
30 | //~^ WARNING hard error |
31 | } | |
32 | ||
33 | mod m4 { | |
5bcae85e | 34 | pub use ::E::*; //~ ERROR variant `V` is private, and cannot be reexported |
9cc50fc6 SL |
35 | //~^ WARNING hard error |
36 | } | |
37 | ||
38 | enum E { V } | |
39 | ||
5bcae85e | 40 | fn main() {} |