Example:
top.rs
use self::submodule; // "error: unresolved import use self::submodule;"
pub mod submodule;
pub type Dummy = ();
and submodule.rs in the same directory
The "use self::submodule" is declaring the same item name as "pub mod submodule" and should be illegal. The error message is misleading and needs to be changed.