2016-02-02 20:21:24 +00:00
|
|
|
mod foo {
|
|
|
|
extern crate core;
|
|
|
|
}
|
|
|
|
|
2016-02-12 06:42:44 +00:00
|
|
|
// Check that private crates can be used from outside their modules, albeit with warnings
|
2020-01-12 13:20:57 +00:00
|
|
|
use foo::core::cell; //~ ERROR crate import `core` is private
|
2016-02-12 06:42:44 +00:00
|
|
|
|
|
|
|
fn f() {
|
2020-01-12 13:20:57 +00:00
|
|
|
foo::core::cell::Cell::new(0); //~ ERROR crate import `core` is private
|
2016-02-02 20:21:24 +00:00
|
|
|
|
|
|
|
use foo::*;
|
|
|
|
mod core {} // Check that private crates are not glob imported
|
|
|
|
}
|
2016-02-12 06:42:44 +00:00
|
|
|
|
2016-04-09 02:31:03 +00:00
|
|
|
mod bar {
|
|
|
|
pub extern crate core;
|
|
|
|
}
|
|
|
|
|
|
|
|
mod baz {
|
|
|
|
pub use bar::*;
|
|
|
|
use self::core::cell; // Check that public extern crates are glob imported
|
|
|
|
}
|
|
|
|
|
2016-09-14 21:51:46 +00:00
|
|
|
fn main() {}
|