]> git.proxmox.com Git - rustc.git/blob - src/test/ui/associated-types/missing-associated-types.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / associated-types / missing-associated-types.stderr
1 error[E0225]: only auto traits can be used as additional traits in a trait object
2 --> $DIR/missing-associated-types.rs:12:32
3 |
4 LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
5 | -------- ^^^^^^^^ additional non-auto trait
6 | |
7 | first non-auto trait
8 |
9 = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
10 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
11
12 error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
13 --> $DIR/missing-associated-types.rs:12:21
14 |
15 LL | type A;
16 | ------- `A` defined here
17 ...
18 LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
19 | ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated type `A` must be specified
20 | | | |
21 | | | associated type `Output` must be specified
22 | | associated type `Output` must be specified
23 | associated type `Output` must be specified
24 |
25 help: specify the associated types
26 |
27 LL | type Foo<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs, Output = Type> + Y<Rhs, A = Type>;
28 | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
29
30 error[E0225]: only auto traits can be used as additional traits in a trait object
31 --> $DIR/missing-associated-types.rs:15:32
32 |
33 LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
34 | -------- ^^^^^^^^ additional non-auto trait
35 | |
36 | first non-auto trait
37 |
38 = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
39 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
40
41 error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
42 --> $DIR/missing-associated-types.rs:15:21
43 |
44 LL | type A;
45 | ------- `A` defined here
46 LL | type B;
47 | ------- `B` defined here
48 ...
49 LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
50 | ^^^^^^^^ ^^^^^^^^ ^^^^^^ ^^^^^^ associated types `A`, `B`, `Output` must be specified
51 | | | |
52 | | | associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
53 | | associated type `Output` must be specified
54 | associated type `Output` must be specified
55 |
56 help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
57 --> $DIR/missing-associated-types.rs:15:43
58 |
59 LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
60 | ^^^^^^
61 help: specify the associated types
62 |
63 LL | type Bar<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + X<Rhs> + Z<Rhs, A = Type, B = Type, Output = Type>;
64 | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66 error[E0225]: only auto traits can be used as additional traits in a trait object
67 --> $DIR/missing-associated-types.rs:18:32
68 |
69 LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
70 | -------- ^^^^^^^^ additional non-auto trait
71 | |
72 | first non-auto trait
73 |
74 = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
75 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
76
77 error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
78 --> $DIR/missing-associated-types.rs:18:21
79 |
80 LL | type A;
81 | ------- `A` defined here
82 ...
83 LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
84 | ^^^^^^^^ ^^^^^^^^ ^^^^^^ associated type `A` must be specified
85 | | |
86 | | associated type `Output` must be specified
87 | associated type `Output` must be specified
88 |
89 help: specify the associated types
90 |
91 LL | type Baz<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Y<Rhs, A = Type>;
92 | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^
93
94 error[E0225]: only auto traits can be used as additional traits in a trait object
95 --> $DIR/missing-associated-types.rs:21:32
96 |
97 LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
98 | -------- ^^^^^^^^ additional non-auto trait
99 | |
100 | first non-auto trait
101 |
102 = help: consider creating a new trait with all of these as super-traits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
103 = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
104
105 error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
106 --> $DIR/missing-associated-types.rs:21:21
107 |
108 LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
109 | ^^^^^^^^ ^^^^^^^^ associated type `Output` must be specified
110 | |
111 | associated type `Output` must be specified
112 |
113 help: specify the associated types
114 |
115 LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
116 | ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
117
118 error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
119 --> $DIR/missing-associated-types.rs:24:21
120 |
121 LL | type Bal<Rhs> = dyn X<Rhs>;
122 | ^^^^^^ associated types `Output` (from trait `Mul`), `Output` (from trait `Div`) must be specified
123 |
124 = help: consider introducing a new type parameter, adding `where` constraints using the fully-qualified path to the associated types
125
126 error: aborting due to 9 previous errors
127
128 Some errors have detailed explanations: E0191, E0225.
129 For more information about an error, try `rustc --explain E0191`.