mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
32 lines
492 B
Rust
32 lines
492 B
Rust
//@ edition: 2021
|
|
//@ check-pass
|
|
// https://github.com/rust-lang/rust/issues/105235#issue-1474295873
|
|
|
|
mod abc {
|
|
pub struct Beeblebrox;
|
|
pub struct Zaphod;
|
|
}
|
|
|
|
mod foo {
|
|
pub mod bar {
|
|
use crate::abc::*;
|
|
|
|
#[derive(Debug)]
|
|
pub enum Zaphod {
|
|
Whale,
|
|
President,
|
|
}
|
|
}
|
|
pub use bar::*;
|
|
}
|
|
|
|
mod baz {
|
|
pub fn do_something() {
|
|
println!("{:?}", crate::foo::Zaphod::Whale);
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
baz::do_something();
|
|
}
|