]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-path-1.stderr
Auto merge of #2731 - RalfJung:rustup, r=RalfJung
[rust.git] / src / test / ui / associated-types / associated-types-path-1.stderr
1 error[E0220]: associated type `A` not found for `T`
2   --> $DIR/associated-types-path-1.rs:10:26
3    |
4 LL | pub fn f1<T>(a: T, x: T::A) {}
5    |                          ^ associated type `A` not found
6
7 error[E0221]: ambiguous associated type `A` in bounds of `T`
8   --> $DIR/associated-types-path-1.rs:11:34
9    |
10 LL |     type A;
11    |     ------ ambiguous `A` from `Foo`
12 ...
13 LL |     type A;
14    |     ------ ambiguous `A` from `Bar`
15 ...
16 LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
17    |                                  ^^^^ ambiguous associated type `A`
18    |
19 help: use fully qualified syntax to disambiguate
20    |
21 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Bar>::A) {}
22    |                                  ~~~~~~~~~~~~
23 help: use fully qualified syntax to disambiguate
24    |
25 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Foo>::A) {}
26    |                                  ~~~~~~~~~~~~
27
28 error: aborting due to 2 previous errors
29
30 Some errors have detailed explanations: E0220, E0221.
31 For more information about an error, try `rustc --explain E0220`.