Closed
Description
I tried this code:
#![feature(inherent_associated_types)]
struct S;
impl S {
type Foo = Vec<i32>;
}
fn main() {
let s = S::Foo::default();
}
I expected to see this happen: It compiles.
Instead, this happened: It fails with error:
error[E0223]: ambiguous associated type
--> src/main.rs:8:13
|
8 | let s = S::Foo::default();
| ^^^^^^ help: use fully-qualified syntax: `<S as Trait>::Foo`
error: aborting due to previous error; 1 warning emitted