]> git.proxmox.com Git - rustc.git/blame - src/test/ui/double-import.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / double-import.rs
CommitLineData
d9579d0f
AL
1// This tests that conflicting imports shows both `use` lines
2// when reporting the error.
c34b1796 3
d9579d0f 4mod sub1 {
54a0048b 5 pub fn foo() {} // implementation 1
d9579d0f 6}
c34b1796 7
d9579d0f 8mod sub2 {
54a0048b 9 pub fn foo() {} // implementation 2
c34b1796
AL
10}
11
ff7c6d11 12use sub1::foo;
041b39d2 13use sub2::foo; //~ ERROR the name `foo` is defined multiple times
d9579d0f
AL
14
15fn main() {}