summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/import-after-macro-expand-5.rs
blob: ba28b6deac7c34cf78504e1a6b1734c3e3c61933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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();
}