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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
171 B
Rust
Raw Normal View History

2016-08-03 18:51:52 -05:00
trait MyTrait { type X; }
struct MyStruct;
impl MyTrait for MyStruct {
type X = ();
}
2016-08-03 18:51:52 -05:00
fn main() {
2016-08-05 22:41:25 -05:00
let foo: MyTrait::X;
//~^ ERROR ambiguous associated type
2016-08-03 18:51:52 -05:00
}