summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/ambiguous-6.rs
blob: ba2623bf48a68d2364a129f7a9f904770ba9c54b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass
// edition: 2021
// https://github.com/rust-lang/rust/issues/112713

pub fn foo() -> u32 {
    use sub::*;
    C
    //~^ WARNING `C` is ambiguous
    //~| WARNING this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
}

mod sub {
    mod mod1 { pub const C: u32 = 1; }
    mod mod2 { pub const C: u32 = 2; }

    pub use mod1::*;
    pub use mod2::*;
}

fn main() {}