-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed as not planned
Labels
F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`
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
Metadata
Metadata
Assignees
Labels
F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`