1error[E0308]: mismatched types
2  --> $DIR/associated-types-eq-3.rs:23:18
3   |
4LL |     let _: Bar = x.boo();
5   |            ---   ^^^^^^^ expected struct `Bar`, found associated type
6   |            |
7   |            expected due to this
8   |
9   = note:       expected struct `Bar`
10           found associated type `<I as Foo>::A`
11help: consider constraining the associated type `<I as Foo>::A` to `Bar`
12   |
13LL | fn foo2<I: Foo<A = Bar>>(x: I) {
14   |               +++++++++
15
16error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
17  --> $DIR/associated-types-eq-3.rs:38:5
18   |
19LL |     foo1(a);
20   |     ^^^^ expected struct `Bar`, found `usize`
21   |
22note: required by a bound in `foo1`
23  --> $DIR/associated-types-eq-3.rs:18:16
24   |
25LL | fn foo1<I: Foo<A=Bar>>(x: I) {
26   |                ^^^^^ required by this bound in `foo1`
27
28error[E0271]: type mismatch resolving `<isize as Foo>::A == Bar`
29  --> $DIR/associated-types-eq-3.rs:41:9
30   |
31LL |     baz(&a);
32   |         ^^ expected struct `Bar`, found `usize`
33   |
34   = note: required for the cast to the object type `dyn Foo<A = Bar>`
35
36error: aborting due to 3 previous errors
37
38Some errors have detailed explanations: E0271, E0308.
39For more information about an error, try `rustc --explain E0271`.
40