blob: a3049892abc39f3453b07eac864eb34b50ba7a74 [file] [log] [blame]
error[E0271]: type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:31:10
|
LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
| ------------------------------------ required by `blue_car`
...
LL | fn b() { blue_car(ModelT); }
| ^^^^^^^^ expected struct `Black`, found struct `Blue`
|
= note: expected type `Black`
found type `Blue`
error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
|
LL | fn black_car<C:Car<Color=Black>>(c: C) {
| -------------------------------------- required by `black_car`
...
LL | fn c() { black_car(ModelU); }
| ^^^^^^^^^ expected struct `Blue`, found struct `Black`
|
= note: expected type `Blue`
found type `Black`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0271`.