]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | error: equality constraints are not yet supported in `where` clauses |
2 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:46 | |
3 | | | |
4 | LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not supported | |
6 | | | |
74b04a01 | 7 | = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information |
dfeec247 | 8 | |
ff7c6d11 | 9 | error[E0221]: ambiguous associated type `Color` in bounds of `C` |
0731742a | 10 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32 |
ff7c6d11 | 11 | | |
0531ce1d | 12 | LL | type Color; |
ff7c6d11 XL |
13 | | ----------- ambiguous `Color` from `Vehicle` |
14 | ... | |
0531ce1d | 15 | LL | type Color; |
ff7c6d11 XL |
16 | | ----------- ambiguous `Color` from `Box` |
17 | ... | |
0531ce1d | 18 | LL | fn dent<C:BoxCar>(c: C, color: C::Color) { |
ff7c6d11 | 19 | | ^^^^^^^^ ambiguous associated type `Color` |
dfeec247 XL |
20 | | |
21 | help: use fully qualified syntax to disambiguate | |
22 | | | |
23 | LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) { | |
24 | | ^^^^^^^^^^^^^^^^^ | |
25 | help: use fully qualified syntax to disambiguate | |
26 | | | |
27 | LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) { | |
28 | | ^^^^^^^^^^^^^^^^^^^^^ | |
ff7c6d11 | 29 | |
dfeec247 | 30 | error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar` |
ba9703b0 | 31 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37 |
ff7c6d11 | 32 | | |
0531ce1d | 33 | LL | type Color; |
ff7c6d11 XL |
34 | | ----------- ambiguous `Color` from `Vehicle` |
35 | ... | |
0531ce1d | 36 | LL | type Color; |
ff7c6d11 XL |
37 | | ----------- ambiguous `Color` from `Box` |
38 | ... | |
dc9dc135 | 39 | LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) { |
ba9703b0 | 40 | | ^^^^^^^^^^^ ambiguous associated type `Color` |
dfeec247 XL |
41 | | |
42 | = help: consider introducing a new type parameter `T` and adding `where` constraints: | |
43 | where | |
44 | T: BoxCar, | |
45 | T: Box::Color = COLOR, | |
46 | T: Vehicle::Color = COLOR | |
ff7c6d11 | 47 | |
dfeec247 XL |
48 | error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified |
49 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30 | |
ff7c6d11 | 50 | | |
a1dfa0c6 | 51 | LL | type Color; |
dfeec247 XL |
52 | | ----------- `Vehicle::Color` defined here |
53 | ... | |
54 | LL | type Color; | |
55 | | ----------- `Box::Color` defined here | |
a1dfa0c6 | 56 | ... |
dc9dc135 | 57 | LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) { |
dfeec247 XL |
58 | | ^^^^^^^^^^^^^^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified |
59 | | | |
60 | = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types | |
ff7c6d11 XL |
61 | |
62 | error[E0221]: ambiguous associated type `Color` in bounds of `C` | |
0731742a | 63 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29 |
ff7c6d11 | 64 | | |
0531ce1d | 65 | LL | type Color; |
ff7c6d11 XL |
66 | | ----------- ambiguous `Color` from `Vehicle` |
67 | ... | |
0531ce1d | 68 | LL | type Color; |
ff7c6d11 XL |
69 | | ----------- ambiguous `Color` from `Box` |
70 | ... | |
0531ce1d | 71 | LL | fn paint<C:BoxCar>(c: C, d: C::Color) { |
ff7c6d11 | 72 | | ^^^^^^^^ ambiguous associated type `Color` |
dfeec247 XL |
73 | | |
74 | help: use fully qualified syntax to disambiguate | |
75 | | | |
76 | LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::Color) { | |
77 | | ^^^^^^^^^^^^^^^^^ | |
78 | help: use fully qualified syntax to disambiguate | |
79 | | | |
80 | LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) { | |
81 | | ^^^^^^^^^^^^^^^^^^^^^ | |
82 | ||
83 | error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified | |
84 | --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32 | |
85 | | | |
86 | LL | type Color; | |
87 | | ----------- `Vehicle::Color` defined here | |
88 | ... | |
89 | LL | type Color; | |
90 | | ----------- `Box::Color` defined here | |
91 | ... | |
92 | LL | fn dent_object_2<COLOR>(c: dyn BoxCar) where <dyn BoxCar as Vehicle>::Color = COLOR { | |
93 | | ^^^^^^ associated types `Color` (from trait `Vehicle`), `Color` (from trait `Box`) must be specified | |
94 | | | |
95 | = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types | |
ff7c6d11 | 96 | |
dfeec247 | 97 | error: aborting due to 6 previous errors |
ff7c6d11 | 98 | |
dfeec247 | 99 | Some errors have detailed explanations: E0191, E0221, E0222. |
0531ce1d | 100 | For more information about an error, try `rustc --explain E0191`. |