Closed
Description
I found an error message that seems a bit off to me. The code:
use foo::baz;
use bar::baz;
fn main() {}
mod foo {
pub mod baz {}
}
mod bar {
pub mod baz {}
}
Clearly it should fail to compile, and it does. But the error message is:
E0252_module.rs:2:5: 2:13 error: a type named `baz` has already been imported in this module [E0252]
E0252_module.rs:2 use bar::baz;
^~~~~~~~
I would expect something like "a module name baz
has already been imported", instead. Is it accurate to call it a type?