]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.stderr
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
[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:31:10
3    |
4 LL | fn b() { blue_car(ModelT); }
5    |          ^^^^^^^^ type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
6    |
7 note: expected this to be `Blue`
8   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:16:40
9    |
10 LL | impl Vehicle for ModelT { type Color = Black; }
11    |                                        ^^^^^
12 note: required by a bound in `blue_car`
13   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:27:19
14    |
15 LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
16    |                   ^^^^^^^^^^ required by this bound in `blue_car`
17
18 error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
19   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
20    |
21 LL | fn c() { black_car(ModelU); }
22    |          ^^^^^^^^^ type mismatch resolving `<ModelU as Vehicle>::Color == Black`
23    |
24 note: expected this to be `Black`
25   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:21:40
26    |
27 LL | impl Vehicle for ModelU { type Color = Blue; }
28    |                                        ^^^^
29 note: required by a bound in `black_car`
30   --> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:24:20
31    |
32 LL | fn black_car<C:Car<Color=Black>>(c: C) {
33    |                    ^^^^^^^^^^^ required by this bound in `black_car`
34
35 error: aborting due to 2 previous errors
36
37 For more information about this error, try `rustc --explain E0271`.