Here is a small example to reproduce the error and its help message:
trait A {
type Item;
}
trait B {
type Item: A;
fn trait_fn(x: Self::Item::Item);
}
Then I get the following error:
error[E0223]: ambiguous associated type
--> src/main.rs:8:20
|
8 | fn trait_fn(x: Self::Item::Item);
| ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<<Self as B>::Item as Trait>::Item`
It looks like the word "Trait" in <<Self as B>::Item as Trait>::Item should be replaced with the trait name A so that the suggested expression compiles:
help: use fully-qualified syntax: <<Self as B>::Item as A>::Item.
Here is a small example to reproduce the error and its help message:
Then I get the following error:
It looks like the word "
Trait" in<<Self as B>::Item as Trait>::Itemshould be replaced with the trait nameAso that the suggested expression compiles:help: use fully-qualified syntax:
<<Self as B>::Item as A>::Item.