]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-type/associated-type-projection-from-multiple-supertraits.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / associated-type / associated-type-projection-from-multiple-supertraits.stderr
CommitLineData
dfeec247
XL
1error: equality constraints are not yet supported in `where` clauses
2 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:46
3 |
4LL | 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 9error[E0221]: ambiguous associated type `Color` in bounds of `C`
0731742a 10 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:19:32
ff7c6d11 11 |
0531ce1d 12LL | type Color;
ff7c6d11
XL
13 | ----------- ambiguous `Color` from `Vehicle`
14...
0531ce1d 15LL | type Color;
ff7c6d11
XL
16 | ----------- ambiguous `Color` from `Box`
17...
0531ce1d 18LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
ff7c6d11 19 | ^^^^^^^^ ambiguous associated type `Color`
dfeec247
XL
20 |
21help: use fully qualified syntax to disambiguate
22 |
23LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) {
24 | ^^^^^^^^^^^^^^^^^
25help: use fully qualified syntax to disambiguate
26 |
27LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) {
28 | ^^^^^^^^^^^^^^^^^^^^^
ff7c6d11 29
dfeec247 30error[E0222]: ambiguous associated type `Color` in bounds of `BoxCar`
ba9703b0 31 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:37
ff7c6d11 32 |
0531ce1d 33LL | type Color;
ff7c6d11
XL
34 | ----------- ambiguous `Color` from `Vehicle`
35...
0531ce1d 36LL | type Color;
ff7c6d11
XL
37 | ----------- ambiguous `Color` from `Box`
38...
dc9dc135 39LL | 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
48error[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 51LL | type Color;
dfeec247
XL
52 | ----------- `Vehicle::Color` defined here
53...
54LL | type Color;
55 | ----------- `Box::Color` defined here
a1dfa0c6 56...
dc9dc135 57LL | 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
62error[E0221]: ambiguous associated type `Color` in bounds of `C`
0731742a 63 --> $DIR/associated-type-projection-from-multiple-supertraits.rs:28:29
ff7c6d11 64 |
0531ce1d 65LL | type Color;
ff7c6d11
XL
66 | ----------- ambiguous `Color` from `Vehicle`
67...
0531ce1d 68LL | type Color;
ff7c6d11
XL
69 | ----------- ambiguous `Color` from `Box`
70...
0531ce1d 71LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
ff7c6d11 72 | ^^^^^^^^ ambiguous associated type `Color`
dfeec247
XL
73 |
74help: use fully qualified syntax to disambiguate
75 |
76LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::Color) {
77 | ^^^^^^^^^^^^^^^^^
78help: use fully qualified syntax to disambiguate
79 |
80LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) {
81 | ^^^^^^^^^^^^^^^^^^^^^
82
83error[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 |
86LL | type Color;
87 | ----------- `Vehicle::Color` defined here
88...
89LL | type Color;
90 | ----------- `Box::Color` defined here
91...
92LL | 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 97error: aborting due to 6 previous errors
ff7c6d11 98
dfeec247 99Some errors have detailed explanations: E0191, E0221, E0222.
0531ce1d 100For more information about an error, try `rustc --explain E0191`.