``` Rust use t::T; mod t { pub trait T {} } struct S; impl T for S {} impl T {} // oops fn main() {} ``` ``` a.rs:8:5: 8:6 error: T is not a trait a.rs:8 impl T for S {} ^ ``` This should show better error message. If `trait T` is not in mod, rustc prints "duplicate definition of module `T`".