]> git.proxmox.com Git - rustc.git/blame - src/test/ui/trait-bounds/unsized-bound.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / trait-bounds / unsized-bound.stderr
CommitLineData
94222f64
XL
1error[E0277]: the size for values of type `B` cannot be known at compilation time
2 --> $DIR/unsized-bound.rs:2:12
3 |
4LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
5 | - ^^^^^^^^^^^^^ doesn't have a size known at compile-time
6 | |
7 | this type parameter needs to be `std::marker::Sized`
8 |
9 = note: required because it appears within the type `(A, B)`
10note: required by a bound in `Trait`
11 --> $DIR/unsized-bound.rs:1:13
12 |
13LL | trait Trait<A> {}
14 | ^ required by this bound in `Trait`
15help: consider removing the `?Sized` bound to make the type parameter `Sized`
16 |
17LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
18LL + impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, {}
923072b8 19 |
94222f64
XL
20help: consider relaxing the implicit `Sized` restriction
21 |
22LL | trait Trait<A: ?Sized> {}
23 | ++++++++
24
25error[E0277]: the size for values of type `A` cannot be known at compilation time
26 --> $DIR/unsized-bound.rs:2:30
27 |
28LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
29 | - ^^^^^^ doesn't have a size known at compile-time
30 | |
31 | this type parameter needs to be `std::marker::Sized`
32 |
33 = note: only the last element of a tuple may have a dynamically sized type
34help: consider removing the `?Sized` bound to make the type parameter `Sized`
35 |
36LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
37LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
923072b8 38 |
94222f64
XL
39
40error[E0277]: the size for values of type `C` cannot be known at compilation time
41 --> $DIR/unsized-bound.rs:5:31
42 |
43LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
44 | - ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
45 | |
46 | this type parameter needs to be `std::marker::Sized`
47 |
48 = note: required because it appears within the type `(A, B, C)`
49note: required by a bound in `Trait`
50 --> $DIR/unsized-bound.rs:1:13
51 |
52LL | trait Trait<A> {}
53 | ^ required by this bound in `Trait`
54help: consider removing the `?Sized` bound to make the type parameter `Sized`
55 |
56LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
57LL + impl<A, B: ?Sized, C> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
923072b8 58 |
94222f64
XL
59help: consider relaxing the implicit `Sized` restriction
60 |
61LL | trait Trait<A: ?Sized> {}
62 | ++++++++
63
64error[E0277]: the size for values of type `A` cannot be known at compilation time
65 --> $DIR/unsized-bound.rs:5:52
66 |
67LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
68 | - ^^^^^^^^^ doesn't have a size known at compile-time
69 | |
70 | this type parameter needs to be `std::marker::Sized`
71 |
72 = note: only the last element of a tuple may have a dynamically sized type
73help: consider removing the `?Sized` bound to make the type parameter `Sized`
74 |
75LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
76LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) {}
923072b8 77 |
94222f64
XL
78
79error[E0277]: the size for values of type `B` cannot be known at compilation time
80 --> $DIR/unsized-bound.rs:5:52
81 |
82LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
83 | - ^^^^^^^^^ doesn't have a size known at compile-time
84 | |
85 | this type parameter needs to be `std::marker::Sized`
86 |
87 = note: only the last element of a tuple may have a dynamically sized type
88help: consider removing the `?Sized` bound to make the type parameter `Sized`
89 |
90LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
91LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
923072b8 92 |
94222f64
XL
93
94error[E0277]: the size for values of type `B` cannot be known at compilation time
95 --> $DIR/unsized-bound.rs:10:28
96 |
97LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
98 | - ^^^^^^^^^^^^^^ doesn't have a size known at compile-time
99 | |
100 | this type parameter needs to be `std::marker::Sized`
101 |
102 = note: required because it appears within the type `(A, B)`
103note: required by a bound in `Trait2`
104 --> $DIR/unsized-bound.rs:9:14
105 |
106LL | trait Trait2<A> {}
107 | ^ required by this bound in `Trait2`
108help: consider removing the `?Sized` bound to make the type parameter `Sized`
109 |
110LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
111LL + impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
923072b8 112 |
94222f64
XL
113help: consider relaxing the implicit `Sized` restriction
114 |
115LL | trait Trait2<A: ?Sized> {}
116 | ++++++++
117
118error[E0277]: the size for values of type `A` cannot be known at compilation time
119 --> $DIR/unsized-bound.rs:10:47
120 |
121LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
122 | - ^^^^^^ doesn't have a size known at compile-time
123 | |
124 | this type parameter needs to be `std::marker::Sized`
125 |
126 = note: only the last element of a tuple may have a dynamically sized type
127help: consider removing the `?Sized` bound to make the type parameter `Sized`
128 |
129LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
130LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
923072b8 131 |
94222f64
XL
132
133error[E0277]: the size for values of type `A` cannot be known at compilation time
134 --> $DIR/unsized-bound.rs:14:9
135 |
136LL | impl<A> Trait3<A> for A where A: ?Sized {}
137 | - ^^^^^^^^^ doesn't have a size known at compile-time
138 | |
139 | this type parameter needs to be `std::marker::Sized`
140 |
141note: required by a bound in `Trait3`
142 --> $DIR/unsized-bound.rs:13:14
143 |
144LL | trait Trait3<A> {}
145 | ^ required by this bound in `Trait3`
146help: consider removing the `?Sized` bound to make the type parameter `Sized`
147 |
148LL - impl<A> Trait3<A> for A where A: ?Sized {}
149LL + impl<A> Trait3<A> for A {}
923072b8 150 |
94222f64
XL
151help: consider relaxing the implicit `Sized` restriction
152 |
153LL | trait Trait3<A: ?Sized> {}
154 | ++++++++
155
156error[E0277]: the size for values of type `A` cannot be known at compilation time
157 --> $DIR/unsized-bound.rs:17:17
158 |
159LL | impl<A: ?Sized> Trait4<A> for A {}
160 | - ^^^^^^^^^ doesn't have a size known at compile-time
161 | |
162 | this type parameter needs to be `std::marker::Sized`
163 |
164note: required by a bound in `Trait4`
165 --> $DIR/unsized-bound.rs:16:14
166 |
167LL | trait Trait4<A> {}
168 | ^ required by this bound in `Trait4`
169help: consider removing the `?Sized` bound to make the type parameter `Sized`
170 |
171LL - impl<A: ?Sized> Trait4<A> for A {}
172LL + impl<A> Trait4<A> for A {}
923072b8 173 |
94222f64
XL
174help: consider relaxing the implicit `Sized` restriction
175 |
176LL | trait Trait4<A: ?Sized> {}
177 | ++++++++
178
179error[E0277]: the size for values of type `X` cannot be known at compilation time
180 --> $DIR/unsized-bound.rs:20:12
181 |
182LL | impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
183 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
184 | |
185 | this type parameter needs to be `std::marker::Sized`
186 |
187note: required by a bound in `Trait5`
188 --> $DIR/unsized-bound.rs:19:14
189 |
190LL | trait Trait5<A, B> {}
191 | ^ required by this bound in `Trait5`
192help: consider removing the `?Sized` bound to make the type parameter `Sized`
193 |
194LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
195LL + impl<X, Y> Trait5<X, Y> for X {}
923072b8 196 |
94222f64
XL
197help: consider relaxing the implicit `Sized` restriction
198 |
199LL | trait Trait5<A: ?Sized, B> {}
200 | ++++++++
201
202error[E0277]: the size for values of type `X` cannot be known at compilation time
203 --> $DIR/unsized-bound.rs:23:20
204 |
205LL | impl<X: ?Sized, Y> Trait6<X, Y> for X {}
206 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
207 | |
208 | this type parameter needs to be `std::marker::Sized`
209 |
210note: required by a bound in `Trait6`
211 --> $DIR/unsized-bound.rs:22:14
212 |
213LL | trait Trait6<A, B> {}
214 | ^ required by this bound in `Trait6`
215help: consider removing the `?Sized` bound to make the type parameter `Sized`
216 |
217LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
218LL + impl<X, Y> Trait6<X, Y> for X {}
923072b8 219 |
94222f64
XL
220help: consider relaxing the implicit `Sized` restriction
221 |
222LL | trait Trait6<A: ?Sized, B> {}
223 | ++++++++
224
225error[E0277]: the size for values of type `Y` cannot be known at compilation time
226 --> $DIR/unsized-bound.rs:26:12
227 |
228LL | impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
229 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
230 | |
231 | this type parameter needs to be `std::marker::Sized`
232 |
233note: required by a bound in `Trait7`
234 --> $DIR/unsized-bound.rs:25:17
235 |
236LL | trait Trait7<A, B> {}
237 | ^ required by this bound in `Trait7`
238help: consider removing the `?Sized` bound to make the type parameter `Sized`
239 |
240LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
241LL + impl<X, Y> Trait7<X, Y> for X {}
923072b8 242 |
94222f64
XL
243help: consider relaxing the implicit `Sized` restriction
244 |
245LL | trait Trait7<A, B: ?Sized> {}
246 | ++++++++
247
248error[E0277]: the size for values of type `Y` cannot be known at compilation time
249 --> $DIR/unsized-bound.rs:29:20
250 |
251LL | impl<X, Y: ?Sized> Trait8<X, Y> for X {}
252 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
253 | |
254 | this type parameter needs to be `std::marker::Sized`
255 |
256note: required by a bound in `Trait8`
257 --> $DIR/unsized-bound.rs:28:17
258 |
259LL | trait Trait8<A, B> {}
260 | ^ required by this bound in `Trait8`
261help: consider removing the `?Sized` bound to make the type parameter `Sized`
262 |
263LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
264LL + impl<X, Y> Trait8<X, Y> for X {}
923072b8 265 |
94222f64
XL
266help: consider relaxing the implicit `Sized` restriction
267 |
268LL | trait Trait8<A, B: ?Sized> {}
269 | ++++++++
270
271error: aborting due to 13 previous errors
272
273For more information about this error, try `rustc --explain E0277`.