rust/tests/ui/pub/pub-reexport-priv-extern-crate.rs
Lukas Wirth eae7fe1bdb Use non-2015 edition paths in tests that do not test for their resolution
This allows for testing these tests on editions other than 2015
2025-06-03 13:35:31 +02:00

21 lines
452 B
Rust

extern crate core;
pub use core as reexported_core; //~ ERROR `core` is private and cannot be re-exported
//~^ WARN this was previously accepted
mod foo1 {
extern crate core;
}
mod foo2 {
use crate::foo1::core; //~ ERROR crate import `core` is private
pub mod bar {
extern crate core;
}
}
mod baz {
pub use crate::foo2::bar::core; //~ ERROR crate import `core` is private
}
fn main() {}