about summary refs log tree commit diff
path: root/tests/ui/imports/ambiguous-6.rs
blob: 1c6e34377165acff00e0080824e250fc12cf78d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//@ edition: 2021
// https://github.com/rust-lang/rust/issues/112713

pub fn foo() -> u32 {
    use sub::*;
    C
    //~^ ERROR `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() {}