1 error[E0277]: the size for values of type `B` cannot be known at compilation time
2 --> $DIR/unsized-bound.rs:2:30
4 LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
5 | - ^^^^^^ doesn't have a size known at compile-time
7 | this type parameter needs to be `Sized`
9 = note: required because it appears within the type `(A, B)`
10 note: required by a bound in `Trait`
11 --> $DIR/unsized-bound.rs:1:13
13 LL | trait Trait<A> {}
14 | ^ required by this bound in `Trait`
15 help: consider removing the `?Sized` bound to make the type parameter `Sized`
17 LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
18 LL + impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, {}
20 help: consider relaxing the implicit `Sized` restriction
22 LL | trait Trait<A: ?Sized> {}
25 error[E0277]: the size for values of type `A` cannot be known at compilation time
26 --> $DIR/unsized-bound.rs:2:30
28 LL | impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
29 | - ^^^^^^ doesn't have a size known at compile-time
31 | this type parameter needs to be `Sized`
33 = note: only the last element of a tuple may have a dynamically sized type
34 help: consider removing the `?Sized` bound to make the type parameter `Sized`
36 LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
37 LL + impl<A, B> Trait<(A, B)> for (A, B) where B: ?Sized, {}
40 error[E0277]: the size for values of type `C` cannot be known at compilation time
41 --> $DIR/unsized-bound.rs:5:52
43 LL | 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
46 | this type parameter needs to be `Sized`
48 = note: required because it appears within the type `(A, B, C)`
49 note: required by a bound in `Trait`
50 --> $DIR/unsized-bound.rs:1:13
52 LL | trait Trait<A> {}
53 | ^ required by this bound in `Trait`
54 help: consider removing the `?Sized` bound to make the type parameter `Sized`
56 LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
57 LL + impl<A, B: ?Sized, C> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
59 help: consider relaxing the implicit `Sized` restriction
61 LL | trait Trait<A: ?Sized> {}
64 error[E0277]: the size for values of type `A` cannot be known at compilation time
65 --> $DIR/unsized-bound.rs:5:52
67 LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
68 | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
70 = note: only the last element of a tuple may have a dynamically sized type
71 help: consider removing the `?Sized` bound to make the type parameter `Sized`
73 LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
74 LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) {}
77 error[E0277]: the size for values of type `B` cannot be known at compilation time
78 --> $DIR/unsized-bound.rs:5:52
80 LL | impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
81 | - this type parameter needs to be `Sized` ^^^^^^^^^ doesn't have a size known at compile-time
83 = note: only the last element of a tuple may have a dynamically sized type
84 help: consider removing the `?Sized` bound to make the type parameter `Sized`
86 LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
87 LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
90 error[E0277]: the size for values of type `B` cannot be known at compilation time
91 --> $DIR/unsized-bound.rs:10:47
93 LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
94 | - ^^^^^^ doesn't have a size known at compile-time
96 | this type parameter needs to be `Sized`
98 = note: required because it appears within the type `(A, B)`
99 note: required by a bound in `Trait2`
100 --> $DIR/unsized-bound.rs:9:14
102 LL | trait Trait2<A> {}
103 | ^ required by this bound in `Trait2`
104 help: consider removing the `?Sized` bound to make the type parameter `Sized`
106 LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
107 LL + impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
109 help: consider relaxing the implicit `Sized` restriction
111 LL | trait Trait2<A: ?Sized> {}
114 error[E0277]: the size for values of type `A` cannot be known at compilation time
115 --> $DIR/unsized-bound.rs:10:47
117 LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
118 | - ^^^^^^ doesn't have a size known at compile-time
120 | this type parameter needs to be `Sized`
122 = note: only the last element of a tuple may have a dynamically sized type
123 help: consider removing the `?Sized` bound to make the type parameter `Sized`
125 LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
126 LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
129 error[E0277]: the size for values of type `A` cannot be known at compilation time
130 --> $DIR/unsized-bound.rs:14:23
132 LL | impl<A> Trait3<A> for A where A: ?Sized {}
133 | - ^ doesn't have a size known at compile-time
135 | this type parameter needs to be `Sized`
137 note: required by a bound in `Trait3`
138 --> $DIR/unsized-bound.rs:13:14
140 LL | trait Trait3<A> {}
141 | ^ required by this bound in `Trait3`
142 help: consider removing the `?Sized` bound to make the type parameter `Sized`
144 LL - impl<A> Trait3<A> for A where A: ?Sized {}
145 LL + impl<A> Trait3<A> for A {}
147 help: consider relaxing the implicit `Sized` restriction
149 LL | trait Trait3<A: ?Sized> {}
152 error[E0277]: the size for values of type `A` cannot be known at compilation time
153 --> $DIR/unsized-bound.rs:17:31
155 LL | impl<A: ?Sized> Trait4<A> for A {}
156 | - ^ doesn't have a size known at compile-time
158 | this type parameter needs to be `Sized`
160 note: required by a bound in `Trait4`
161 --> $DIR/unsized-bound.rs:16:14
163 LL | trait Trait4<A> {}
164 | ^ required by this bound in `Trait4`
165 help: consider removing the `?Sized` bound to make the type parameter `Sized`
167 LL - impl<A: ?Sized> Trait4<A> for A {}
168 LL + impl<A> Trait4<A> for A {}
170 help: consider relaxing the implicit `Sized` restriction
172 LL | trait Trait4<A: ?Sized> {}
175 error[E0277]: the size for values of type `X` cannot be known at compilation time
176 --> $DIR/unsized-bound.rs:20:29
178 LL | impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
179 | - ^ doesn't have a size known at compile-time
181 | this type parameter needs to be `Sized`
183 note: required by a bound in `Trait5`
184 --> $DIR/unsized-bound.rs:19:14
186 LL | trait Trait5<A, B> {}
187 | ^ required by this bound in `Trait5`
188 help: consider removing the `?Sized` bound to make the type parameter `Sized`
190 LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
191 LL + impl<X, Y> Trait5<X, Y> for X {}
193 help: consider relaxing the implicit `Sized` restriction
195 LL | trait Trait5<A: ?Sized, B> {}
198 error[E0277]: the size for values of type `X` cannot be known at compilation time
199 --> $DIR/unsized-bound.rs:23:37
201 LL | impl<X: ?Sized, Y> Trait6<X, Y> for X {}
202 | - ^ doesn't have a size known at compile-time
204 | this type parameter needs to be `Sized`
206 note: required by a bound in `Trait6`
207 --> $DIR/unsized-bound.rs:22:14
209 LL | trait Trait6<A, B> {}
210 | ^ required by this bound in `Trait6`
211 help: consider removing the `?Sized` bound to make the type parameter `Sized`
213 LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
214 LL + impl<X, Y> Trait6<X, Y> for X {}
216 help: consider relaxing the implicit `Sized` restriction
218 LL | trait Trait6<A: ?Sized, B> {}
221 error[E0277]: the size for values of type `Y` cannot be known at compilation time
222 --> $DIR/unsized-bound.rs:26:12
224 LL | impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
225 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
227 | this type parameter needs to be `Sized`
229 note: required by a bound in `Trait7`
230 --> $DIR/unsized-bound.rs:25:17
232 LL | trait Trait7<A, B> {}
233 | ^ required by this bound in `Trait7`
234 help: consider removing the `?Sized` bound to make the type parameter `Sized`
236 LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
237 LL + impl<X, Y> Trait7<X, Y> for X {}
239 help: consider relaxing the implicit `Sized` restriction
241 LL | trait Trait7<A, B: ?Sized> {}
244 error[E0277]: the size for values of type `Y` cannot be known at compilation time
245 --> $DIR/unsized-bound.rs:29:20
247 LL | impl<X, Y: ?Sized> Trait8<X, Y> for X {}
248 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
250 | this type parameter needs to be `Sized`
252 note: required by a bound in `Trait8`
253 --> $DIR/unsized-bound.rs:28:17
255 LL | trait Trait8<A, B> {}
256 | ^ required by this bound in `Trait8`
257 help: consider removing the `?Sized` bound to make the type parameter `Sized`
259 LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
260 LL + impl<X, Y> Trait8<X, Y> for X {}
262 help: consider relaxing the implicit `Sized` restriction
264 LL | trait Trait8<A, B: ?Sized> {}
267 error: aborting due to 13 previous errors
269 For more information about this error, try `rustc --explain E0277`.