Closed
Description
The following snippet is not correct:
trait Bar {}
trait Foo where Foo::Assoc: Bar {
type Assoc;
}
But these three are:
trait Foo where Self::Assoc: Bar {
type Assoc;
}
trait Foo where <Self as Foo>::Assoc: Bar {
type Assoc;
}
trait Foo {
type Assoc: Bar;
}
For the first we currently emit:
error[E0223]: ambiguous associated type
--> file.rs:3:17
|
3 | trait Foo where Foo::Assoc: Bar {
| ^^^^^^^^^^ help: use fully-qualified syntax: `<Type as Foo>::Assoc`
but it should suggest one of the two valid snippets above.