1 error[E0277]: the size for values of type `W` cannot be known at compilation time
2 --> $DIR/unsized-enum2.rs:23:8
4 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
5 | - this type parameter needs to be `std::marker::Sized`
8 | ^ doesn't have a size known at compile-time
10 = note: no field of an enum variant may have a dynamically sized type
11 = help: change the field's type to have a statically known size
12 help: borrowed types always have a statically known size
16 help: the `Box` type always has a statically known size and allocates its contents in the heap
21 error[E0277]: the size for values of type `X` cannot be known at compilation time
22 --> $DIR/unsized-enum2.rs:25:11
24 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
25 | - this type parameter needs to be `std::marker::Sized`
28 | ^ doesn't have a size known at compile-time
30 = note: no field of an enum variant may have a dynamically sized type
31 = help: change the field's type to have a statically known size
32 help: borrowed types always have a statically known size
36 help: the `Box` type always has a statically known size and allocates its contents in the heap
41 error[E0277]: the size for values of type `Y` cannot be known at compilation time
42 --> $DIR/unsized-enum2.rs:27:15
44 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
45 | - this type parameter needs to be `std::marker::Sized`
48 | ^ doesn't have a size known at compile-time
50 = note: no field of an enum variant may have a dynamically sized type
51 = help: change the field's type to have a statically known size
52 help: borrowed types always have a statically known size
56 help: the `Box` type always has a statically known size and allocates its contents in the heap
58 LL | VC(isize, Box<Y>),
61 error[E0277]: the size for values of type `Z` cannot be known at compilation time
62 --> $DIR/unsized-enum2.rs:29:21
64 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
65 | - this type parameter needs to be `std::marker::Sized`
67 LL | VD{u: isize, x: Z},
68 | ^ doesn't have a size known at compile-time
70 = note: no field of an enum variant may have a dynamically sized type
71 = help: change the field's type to have a statically known size
72 help: borrowed types always have a statically known size
74 LL | VD{u: isize, x: &Z},
76 help: the `Box` type always has a statically known size and allocates its contents in the heap
78 LL | VD{u: isize, x: Box<Z>},
81 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
82 --> $DIR/unsized-enum2.rs:33:8
85 | ^^^^ doesn't have a size known at compile-time
87 = help: the trait `std::marker::Sized` is not implemented for `[u8]`
88 = note: no field of an enum variant may have a dynamically sized type
89 = help: change the field's type to have a statically known size
90 help: borrowed types always have a statically known size
94 help: the `Box` type always has a statically known size and allocates its contents in the heap
99 error[E0277]: the size for values of type `str` cannot be known at compilation time
100 --> $DIR/unsized-enum2.rs:35:11
103 | ^^^ doesn't have a size known at compile-time
105 = help: the trait `std::marker::Sized` is not implemented for `str`
106 = note: no field of an enum variant may have a dynamically sized type
107 = help: change the field's type to have a statically known size
108 help: borrowed types always have a statically known size
112 help: the `Box` type always has a statically known size and allocates its contents in the heap
114 LL | VF{x: Box<str>},
117 error[E0277]: the size for values of type `[f32]` cannot be known at compilation time
118 --> $DIR/unsized-enum2.rs:37:15
120 LL | VG(isize, [f32]),
121 | ^^^^^ doesn't have a size known at compile-time
123 = help: the trait `std::marker::Sized` is not implemented for `[f32]`
124 = note: no field of an enum variant may have a dynamically sized type
125 = help: change the field's type to have a statically known size
126 help: borrowed types always have a statically known size
128 LL | VG(isize, &[f32]),
130 help: the `Box` type always has a statically known size and allocates its contents in the heap
132 LL | VG(isize, Box<[f32]>),
135 error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
136 --> $DIR/unsized-enum2.rs:39:21
138 LL | VH{u: isize, x: [u32]},
139 | ^^^^^ doesn't have a size known at compile-time
141 = help: the trait `std::marker::Sized` is not implemented for `[u32]`
142 = note: no field of an enum variant may have a dynamically sized type
143 = help: change the field's type to have a statically known size
144 help: borrowed types always have a statically known size
146 LL | VH{u: isize, x: &[u32]},
148 help: the `Box` type always has a statically known size and allocates its contents in the heap
150 LL | VH{u: isize, x: Box<[u32]>},
153 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
154 --> $DIR/unsized-enum2.rs:53:8
157 | ^^^^^^^ doesn't have a size known at compile-time
159 = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + 'static)`
160 = note: no field of an enum variant may have a dynamically sized type
161 = help: change the field's type to have a statically known size
162 help: borrowed types always have a statically known size
166 help: the `Box` type always has a statically known size and allocates its contents in the heap
168 LL | VM(Box<dyn Foo>),
171 error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
172 --> $DIR/unsized-enum2.rs:55:11
175 | ^^^^^^^ doesn't have a size known at compile-time
177 = help: the trait `std::marker::Sized` is not implemented for `(dyn Bar + 'static)`
178 = note: no field of an enum variant may have a dynamically sized type
179 = help: change the field's type to have a statically known size
180 help: borrowed types always have a statically known size
182 LL | VN{x: &dyn Bar},
184 help: the `Box` type always has a statically known size and allocates its contents in the heap
186 LL | VN{x: Box<dyn Bar>},
189 error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
190 --> $DIR/unsized-enum2.rs:57:15
192 LL | VO(isize, dyn FooBar),
193 | ^^^^^^^^^^ doesn't have a size known at compile-time
195 = help: the trait `std::marker::Sized` is not implemented for `(dyn FooBar + 'static)`
196 = note: no field of an enum variant may have a dynamically sized type
197 = help: change the field's type to have a statically known size
198 help: borrowed types always have a statically known size
200 LL | VO(isize, &dyn FooBar),
202 help: the `Box` type always has a statically known size and allocates its contents in the heap
204 LL | VO(isize, Box<dyn FooBar>),
207 error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
208 --> $DIR/unsized-enum2.rs:59:21
210 LL | VP{u: isize, x: dyn BarFoo},
211 | ^^^^^^^^^^ doesn't have a size known at compile-time
213 = help: the trait `std::marker::Sized` is not implemented for `(dyn BarFoo + 'static)`
214 = note: no field of an enum variant may have a dynamically sized type
215 = help: change the field's type to have a statically known size
216 help: borrowed types always have a statically known size
218 LL | VP{u: isize, x: &dyn BarFoo},
220 help: the `Box` type always has a statically known size and allocates its contents in the heap
222 LL | VP{u: isize, x: Box<dyn BarFoo>},
225 error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
226 --> $DIR/unsized-enum2.rs:63:8
228 LL | VQ(<&'static [i8] as Deref>::Target),
229 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
231 = help: the trait `std::marker::Sized` is not implemented for `[i8]`
232 = note: no field of an enum variant may have a dynamically sized type
233 = help: change the field's type to have a statically known size
234 help: borrowed types always have a statically known size
236 LL | VQ(&<&'static [i8] as Deref>::Target),
238 help: the `Box` type always has a statically known size and allocates its contents in the heap
240 LL | VQ(Box<<&'static [i8] as Deref>::Target>),
243 error[E0277]: the size for values of type `[char]` cannot be known at compilation time
244 --> $DIR/unsized-enum2.rs:65:11
246 LL | VR{x: <&'static [char] as Deref>::Target},
247 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
249 = help: the trait `std::marker::Sized` is not implemented for `[char]`
250 = note: no field of an enum variant may have a dynamically sized type
251 = help: change the field's type to have a statically known size
252 help: borrowed types always have a statically known size
254 LL | VR{x: &<&'static [char] as Deref>::Target},
256 help: the `Box` type always has a statically known size and allocates its contents in the heap
258 LL | VR{x: Box<<&'static [char] as Deref>::Target>},
261 error[E0277]: the size for values of type `[f64]` cannot be known at compilation time
262 --> $DIR/unsized-enum2.rs:67:15
264 LL | VS(isize, <&'static [f64] as Deref>::Target),
265 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
267 = help: the trait `std::marker::Sized` is not implemented for `[f64]`
268 = note: no field of an enum variant may have a dynamically sized type
269 = help: change the field's type to have a statically known size
270 help: borrowed types always have a statically known size
272 LL | VS(isize, &<&'static [f64] as Deref>::Target),
274 help: the `Box` type always has a statically known size and allocates its contents in the heap
276 LL | VS(isize, Box<<&'static [f64] as Deref>::Target>),
279 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
280 --> $DIR/unsized-enum2.rs:69:21
282 LL | VT{u: isize, x: <&'static [i32] as Deref>::Target},
283 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
285 = help: the trait `std::marker::Sized` is not implemented for `[i32]`
286 = note: no field of an enum variant may have a dynamically sized type
287 = help: change the field's type to have a statically known size
288 help: borrowed types always have a statically known size
290 LL | VT{u: isize, x: &<&'static [i32] as Deref>::Target},
292 help: the `Box` type always has a statically known size and allocates its contents in the heap
294 LL | VT{u: isize, x: Box<<&'static [i32] as Deref>::Target>},
297 error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time
298 --> $DIR/unsized-enum2.rs:43:8
301 | ^^^^^ doesn't have a size known at compile-time
303 = help: within `Path1`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper1 + 'static)`
304 = note: required because it appears within the type `Path1`
305 = note: no field of an enum variant may have a dynamically sized type
306 = help: change the field's type to have a statically known size
307 help: borrowed types always have a statically known size
311 help: the `Box` type always has a statically known size and allocates its contents in the heap
316 error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time
317 --> $DIR/unsized-enum2.rs:45:11
320 | ^^^^^ doesn't have a size known at compile-time
322 = help: within `Path2`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper2 + 'static)`
323 = note: required because it appears within the type `Path2`
324 = note: no field of an enum variant may have a dynamically sized type
325 = help: change the field's type to have a statically known size
326 help: borrowed types always have a statically known size
330 help: the `Box` type always has a statically known size and allocates its contents in the heap
332 LL | VJ{x: Box<Path2>},
335 error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time
336 --> $DIR/unsized-enum2.rs:47:15
338 LL | VK(isize, Path3),
339 | ^^^^^ doesn't have a size known at compile-time
341 = help: within `Path3`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper3 + 'static)`
342 = note: required because it appears within the type `Path3`
343 = note: no field of an enum variant may have a dynamically sized type
344 = help: change the field's type to have a statically known size
345 help: borrowed types always have a statically known size
347 LL | VK(isize, &Path3),
349 help: the `Box` type always has a statically known size and allocates its contents in the heap
351 LL | VK(isize, Box<Path3>),
354 error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time
355 --> $DIR/unsized-enum2.rs:49:21
357 LL | VL{u: isize, x: Path4},
358 | ^^^^^ doesn't have a size known at compile-time
360 = help: within `Path4`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper4 + 'static)`
361 = note: required because it appears within the type `Path4`
362 = note: no field of an enum variant may have a dynamically sized type
363 = help: change the field's type to have a statically known size
364 help: borrowed types always have a statically known size
366 LL | VL{u: isize, x: &Path4},
368 help: the `Box` type always has a statically known size and allocates its contents in the heap
370 LL | VL{u: isize, x: Box<Path4>},
373 error: aborting due to 20 previous errors
375 For more information about this error, try `rustc --explain E0277`.