summaryrefslogtreecommitdiffstats
path: root/src/test/ui/imports/issue-55884-1.rs
blob: 21744aa5d7bfa51b73a2ccf7f9dc7fff7409a31b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mod m {
    mod m1 {
        pub struct S {}
    }
    mod m2 {
        // Note this derive, it makes this struct macro-expanded,
        // so it doesn't appear in time to participate in the initial resolution of `use m::S`,
        // only in the later validation pass.
        #[derive(Default)]
        pub struct S {}
    }

    // Create a glob vs glob ambiguity
    pub use self::m1::*;
    pub use self::m2::*;
}

fn main() {
    use m::S; //~ ERROR `S` is ambiguous
    let s = S {};
}