]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pub/pub-reexport-priv-extern-crate.rs
Rollup merge of #98715 - matthiaskrgr:test_97047, r=Mark-Simulacrum
[rust.git] / src / test / ui / pub / pub-reexport-priv-extern-crate.rs
1 extern crate core;
2 pub use core as reexported_core; //~ ERROR `core` is private, and cannot be re-exported
3                                  //~^ WARN this was previously accepted
4
5 mod foo1 {
6     extern crate core;
7 }
8
9 mod foo2 {
10     use foo1::core; //~ ERROR crate import `core` is private
11     pub mod bar {
12         extern crate core;
13     }
14 }
15
16 mod baz {
17     pub use foo2::bar::core; //~ ERROR crate import `core` is private
18 }
19
20 fn main() {}