mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 20:35:53 +00:00
16 lines
295 B
Rust
16 lines
295 B
Rust
// 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() {}
|