rust/tests/ui/error-codes/E0223.rs

11 lines
171 B
Rust

trait MyTrait { type X; }
struct MyStruct;
impl MyTrait for MyStruct {
type X = ();
}
fn main() {
let foo: MyTrait::X;
//~^ ERROR ambiguous associated type
}