summaryrefslogtreecommitdiffstats
path: root/tests/ui/imports/double-import.rs
blob: e7325368b4d31cdfde22b5dafb0e9c94a4a75ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// This tests that conflicting imports shows both `use` lines
// when reporting the error.

mod sub1 {
    pub fn foo() {} // implementation 1
}

mod sub2 {
    pub fn foo() {} // implementation 2
}

use sub1::foo;
use sub2::foo; //~ ERROR the name `foo` is defined multiple times

fn main() {}