1 error[E0277]: the size for values of type `B` cannot be known at compilation time
2 --> $DIR/unsized-bound.rs:2:12
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 `std::marker::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 `std::marker::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:31
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 `std::marker::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 | - ^^^^^^^^^ doesn't have a size known at compile-time
70 | this type parameter needs to be `std::marker::Sized`
72 = note: only the last element of a tuple may have a dynamically sized type
73 help: consider removing the `?Sized` bound to make the type parameter `Sized`
75 LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
76 LL + impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) {}
79 error[E0277]: the size for values of type `B` cannot be known at compilation time
80 --> $DIR/unsized-bound.rs:5:52
82 LL | 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
85 | this type parameter needs to be `std::marker::Sized`
87 = note: only the last element of a tuple may have a dynamically sized type
88 help: consider removing the `?Sized` bound to make the type parameter `Sized`
90 LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
91 LL + impl<A, B, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
94 error[E0277]: the size for values of type `B` cannot be known at compilation time
95 --> $DIR/unsized-bound.rs:10:28
97 LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
98 | - ^^^^^^^^^^^^^^ doesn't have a size known at compile-time
100 | this type parameter needs to be `std::marker::Sized`
102 = note: required because it appears within the type `(A, B)`
103 note: required by a bound in `Trait2`
104 --> $DIR/unsized-bound.rs:9:14
106 LL | trait Trait2<A> {}
107 | ^ required by this bound in `Trait2`
108 help: consider removing the `?Sized` bound to make the type parameter `Sized`
110 LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
111 LL + impl<A: ?Sized, B> Trait2<(A, B)> for (A, B) {}
113 help: consider relaxing the implicit `Sized` restriction
115 LL | trait Trait2<A: ?Sized> {}
118 error[E0277]: the size for values of type `A` cannot be known at compilation time
119 --> $DIR/unsized-bound.rs:10:47
121 LL | impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
122 | - ^^^^^^ doesn't have a size known at compile-time
124 | this type parameter needs to be `std::marker::Sized`
126 = note: only the last element of a tuple may have a dynamically sized type
127 help: consider removing the `?Sized` bound to make the type parameter `Sized`
129 LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
130 LL + impl<A, B: ?Sized> Trait2<(A, B)> for (A, B) {}
133 error[E0277]: the size for values of type `A` cannot be known at compilation time
134 --> $DIR/unsized-bound.rs:14:9
136 LL | impl<A> Trait3<A> for A where A: ?Sized {}
137 | - ^^^^^^^^^ doesn't have a size known at compile-time
139 | this type parameter needs to be `std::marker::Sized`
141 note: required by a bound in `Trait3`
142 --> $DIR/unsized-bound.rs:13:14
144 LL | trait Trait3<A> {}
145 | ^ required by this bound in `Trait3`
146 help: consider removing the `?Sized` bound to make the type parameter `Sized`
148 LL - impl<A> Trait3<A> for A where A: ?Sized {}
149 LL + impl<A> Trait3<A> for A {}
151 help: consider relaxing the implicit `Sized` restriction
153 LL | trait Trait3<A: ?Sized> {}
156 error[E0277]: the size for values of type `A` cannot be known at compilation time
157 --> $DIR/unsized-bound.rs:17:17
159 LL | impl<A: ?Sized> Trait4<A> for A {}
160 | - ^^^^^^^^^ doesn't have a size known at compile-time
162 | this type parameter needs to be `std::marker::Sized`
164 note: required by a bound in `Trait4`
165 --> $DIR/unsized-bound.rs:16:14
167 LL | trait Trait4<A> {}
168 | ^ required by this bound in `Trait4`
169 help: consider removing the `?Sized` bound to make the type parameter `Sized`
171 LL - impl<A: ?Sized> Trait4<A> for A {}
172 LL + impl<A> Trait4<A> for A {}
174 help: consider relaxing the implicit `Sized` restriction
176 LL | trait Trait4<A: ?Sized> {}
179 error[E0277]: the size for values of type `X` cannot be known at compilation time
180 --> $DIR/unsized-bound.rs:20:12
182 LL | impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
183 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
185 | this type parameter needs to be `std::marker::Sized`
187 note: required by a bound in `Trait5`
188 --> $DIR/unsized-bound.rs:19:14
190 LL | trait Trait5<A, B> {}
191 | ^ required by this bound in `Trait5`
192 help: consider removing the `?Sized` bound to make the type parameter `Sized`
194 LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
195 LL + impl<X, Y> Trait5<X, Y> for X {}
197 help: consider relaxing the implicit `Sized` restriction
199 LL | trait Trait5<A: ?Sized, B> {}
202 error[E0277]: the size for values of type `X` cannot be known at compilation time
203 --> $DIR/unsized-bound.rs:23:20
205 LL | impl<X: ?Sized, Y> Trait6<X, Y> for X {}
206 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
208 | this type parameter needs to be `std::marker::Sized`
210 note: required by a bound in `Trait6`
211 --> $DIR/unsized-bound.rs:22:14
213 LL | trait Trait6<A, B> {}
214 | ^ required by this bound in `Trait6`
215 help: consider removing the `?Sized` bound to make the type parameter `Sized`
217 LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
218 LL + impl<X, Y> Trait6<X, Y> for X {}
220 help: consider relaxing the implicit `Sized` restriction
222 LL | trait Trait6<A: ?Sized, B> {}
225 error[E0277]: the size for values of type `Y` cannot be known at compilation time
226 --> $DIR/unsized-bound.rs:26:12
228 LL | impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
229 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
231 | this type parameter needs to be `std::marker::Sized`
233 note: required by a bound in `Trait7`
234 --> $DIR/unsized-bound.rs:25:17
236 LL | trait Trait7<A, B> {}
237 | ^ required by this bound in `Trait7`
238 help: consider removing the `?Sized` bound to make the type parameter `Sized`
240 LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
241 LL + impl<X, Y> Trait7<X, Y> for X {}
243 help: consider relaxing the implicit `Sized` restriction
245 LL | trait Trait7<A, B: ?Sized> {}
248 error[E0277]: the size for values of type `Y` cannot be known at compilation time
249 --> $DIR/unsized-bound.rs:29:20
251 LL | impl<X, Y: ?Sized> Trait8<X, Y> for X {}
252 | - ^^^^^^^^^^^^ doesn't have a size known at compile-time
254 | this type parameter needs to be `std::marker::Sized`
256 note: required by a bound in `Trait8`
257 --> $DIR/unsized-bound.rs:28:17
259 LL | trait Trait8<A, B> {}
260 | ^ required by this bound in `Trait8`
261 help: consider removing the `?Sized` bound to make the type parameter `Sized`
263 LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
264 LL + impl<X, Y> Trait8<X, Y> for X {}
266 help: consider relaxing the implicit `Sized` restriction
268 LL | trait Trait8<A, B: ?Sized> {}
271 error: aborting due to 13 previous errors
273 For more information about this error, try `rustc --explain E0277`.