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