Closed
Description
Currently, E0221 can give an error like:
error[E0221]: ambiguous associated type `A` in bounds of `Self`
--> src/test/compile-fail/E0221.rs:21:16
|
21 | let _: Self::A;
| ^^^^^^^ ambiguous associated type `A`
|
note: associated type `Self` could derive from `Foo`
--> src/test/compile-fail/E0221.rs:21:16
|
21 | let _: Self::A;
| ^^^^^^^
note: associated type `Self` could derive from `Bar`
--> src/test/compile-fail/E0221.rs:21:16
|
21 | let _: Self::A;
| ^^^^^^^
This isn't terribly helpful. Ideally, we'd like to show where these associated types that cause ambiguity are coming from:
error[E0221]: ambiguous associated type `A` in bounds of `Self`
--> src/test/compile-fail/E0221.rs:21:16
|
15 | type A: T1;
| ---------- ambiguous `A` from `Foo`
...
19 | type A: T2;
| ---------- ambiguous `A` from `Bar`
20 | fn do_something() {
21 | let _: Self::A;
| ^^^^^^^ ambiguous associated type `A`
Activity