]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[rust.git] / src / test / ui / associated-types / associated-types-binding-to-type-defined-in-supertrait.stderr
1 error[E0271]: type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
2   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:47:10
3    |
4 LL | fn b() { blue_car(ModelT); } //~ ERROR type mismatch
5    |          ^^^^^^^^ expected struct `Black`, found struct `Blue`
6    |
7    = note: expected type `Black`
8               found type `Blue`
9 note: required by `blue_car`
10   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:43:1
11    |
12 LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
13    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
16   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:48:10
17    |
18 LL | fn c() { black_car(ModelU); } //~ ERROR type mismatch
19    |          ^^^^^^^^^ expected struct `Blue`, found struct `Black`
20    |
21    = note: expected type `Blue`
22               found type `Black`
23 note: required by `black_car`
24   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:40:1
25    |
26 LL | fn black_car<C:Car<Color=Black>>(c: C) {
27    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
29 error: aborting due to 2 previous errors
30
31 For more information about this error, try `rustc --explain E0271`.