]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / associated-types / associated-type-projection-from-multiple-supertraits.stderr
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 |
7 = note: see issue #20041 <https://github.com/rust-lang/rust/issues/20041> for more information
8
9 error[E0221]: ambiguous associated type `Color` in bounds of `C`
10 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32
11 |
12 LL | type Color;
13 | ----------- ambiguous `Color` from `Vehicle`
14 ...
15 LL | type Color;
16 | ----------- ambiguous `Color` from `Box`
17 ...
18 LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
19 | ^^^^^^^^ ambiguous associated type `Color`
20 |
21 help: use fully qualified syntax to disambiguate
22 |
23 LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) {
24 | ~~~~~~~~~~~~~~~~
25 help: use fully qualified syntax to disambiguate
26 |
27 LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) {
28 | ~~~~~~~~~~~~
29
30 error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
31 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
32 |
33 LL | type Color;
34 | ----------- ambiguous `Color` from `Vehicle`
35 ...
36 LL | type Color;
37 | ----------- ambiguous `Color` from `Box`
38 ...
39 LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
40 | ^^^^^^^^^^^ ambiguous associated type `Color`
41 |
42 = help: consider introducing a new type parameter `T` and adding `where` constraints:
43 where
44 T: BoxCar,
45 T: Vehicle::Color = COLOR,
46 T: Box::Color = COLOR
47
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
50 |
51 LL | type Color;
52 | ----------- `Vehicle::Color` defined here
53 ...
54 LL | type Color;
55 | ----------- `Box::Color` defined here
56 ...
57 LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
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
61
62 error[E0221]: ambiguous associated type `Color` in bounds of `C`
63 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29
64 |
65 LL | type Color;
66 | ----------- ambiguous `Color` from `Vehicle`
67 ...
68 LL | type Color;
69 | ----------- ambiguous `Color` from `Box`
70 ...
71 LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
72 | ^^^^^^^^ ambiguous associated type `Color`
73 |
74 help: use fully qualified syntax to disambiguate
75 |
76 LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) {
77 | ~~~~~~~~~~~~~~~~
78 help: use fully qualified syntax to disambiguate
79 |
80 LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::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
96
97 error: aborting due to 6 previous errors
98
99 Some errors have detailed explanations: E0191, E0221, E0222.
100 For more information about an error, try `rustc --explain E0191`.