about summary refs log tree commit diff
path: root/tests/ui/imports/issue-4865-2.rs
blob: 60ce2a468d9e498779733a2822ad81002504caaf (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
//@ run-pass
// Previously, this would have failed to resolve due to the circular
// block between `use say` and `pub use hello::*`.
//
// Now, as `use say` is not `pub`, the glob import can resolve
// without any problem and this resolves fine.

pub use hello::*;

pub mod say {
    pub fn hello() { println!("hello"); }
}

pub mod hello {
    use crate::say;

    pub fn hello() {
        say::hello();
    }
}

fn main() {
    hello();
}