rust/tests/ui/unsized/unsized-enum2.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

412 lines
16 KiB
Plaintext
Raw Normal View History

2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `W` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:23:8
|
2019-10-08 13:03:35 -05:00
LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
| - this type parameter needs to be `Sized`
2019-10-08 13:03:35 -05:00
LL | // parameter
LL | VA(W),
2018-06-19 17:53:51 -05:00
| ^ doesn't have a size known at compile-time
|
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
LL + enum E<W, X: ?Sized, Y: ?Sized, Z: ?Sized> {
2022-06-08 12:34:57 -05:00
|
help: borrowed types always have a statically known size
|
LL | VA(&W),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VA(Box<W>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `X` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:25:11
|
2019-10-08 13:03:35 -05:00
LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
| - this type parameter needs to be `Sized`
2019-10-08 13:03:35 -05:00
...
LL | VB{x: X},
| ^ doesn't have a size known at compile-time
|
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
LL + enum E<W: ?Sized, X, Y: ?Sized, Z: ?Sized> {
2022-06-08 12:34:57 -05:00
|
help: borrowed types always have a statically known size
|
LL | VB{x: &X},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VB{x: Box<X>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `Y` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:27:15
|
2019-10-08 13:03:35 -05:00
LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
| - this type parameter needs to be `Sized`
2019-10-08 13:03:35 -05:00
...
LL | VC(isize, Y),
2018-06-19 17:53:51 -05:00
| ^ doesn't have a size known at compile-time
|
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
LL + enum E<W: ?Sized, X: ?Sized, Y, Z: ?Sized> {
2022-06-08 12:34:57 -05:00
|
help: borrowed types always have a statically known size
|
LL | VC(isize, &Y),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VC(isize, Box<Y>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `Z` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:29:21
|
2019-10-08 13:03:35 -05:00
LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
| - this type parameter needs to be `Sized`
2019-10-08 13:03:35 -05:00
...
LL | VD{u: isize, x: Z},
| ^ doesn't have a size known at compile-time
|
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
LL + enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z> {
2022-06-08 12:34:57 -05:00
|
help: borrowed types always have a statically known size
|
LL | VD{u: isize, x: &Z},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VD{u: isize, x: Box<Z>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:33:8
|
LL | VE([u8]),
2018-06-19 17:53:51 -05:00
| ^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u8]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VE(&[u8]),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VE(Box<[u8]>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:35:11
|
LL | VF{x: str},
| ^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `str`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VF{x: &str},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VF{x: Box<str>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[f32]` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:37:15
|
LL | VG(isize, [f32]),
2018-06-19 17:53:51 -05:00
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[f32]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VG(isize, &[f32]),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VG(isize, Box<[f32]>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:39:21
|
LL | VH{u: isize, x: [u32]},
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u32]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VH{u: isize, x: &[u32]},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VH{u: isize, x: Box<[u32]>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:53:8
|
2019-05-28 13:46:13 -05:00
LL | VM(dyn Foo),
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Foo + 'static)`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VM(&dyn Foo),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VM(Box<dyn Foo>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:55:11
|
2019-05-28 13:46:13 -05:00
LL | VN{x: dyn Bar},
| ^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Bar + 'static)`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VN{x: &dyn Bar},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VN{x: Box<dyn Bar>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:57:15
|
2019-05-28 13:46:13 -05:00
LL | VO(isize, dyn FooBar),
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn FooBar + 'static)`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VO(isize, &dyn FooBar),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VO(isize, Box<dyn FooBar>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:59:21
|
2019-05-28 13:46:13 -05:00
LL | VP{u: isize, x: dyn BarFoo},
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn BarFoo + 'static)`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VP{u: isize, x: &dyn BarFoo},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VP{u: isize, x: Box<dyn BarFoo>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:63:8
|
LL | VQ(<&'static [i8] as Deref>::Target),
2018-06-19 17:53:51 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[i8]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VQ(&<&'static [i8] as Deref>::Target),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VQ(Box<<&'static [i8] as Deref>::Target>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[char]` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:65:11
|
2018-02-22 18:42:32 -06:00
LL | VR{x: <&'static [char] as Deref>::Target},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[char]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VR{x: &<&'static [char] as Deref>::Target},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VR{x: Box<<&'static [char] as Deref>::Target>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[f64]` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:67:15
|
2018-02-22 18:42:32 -06:00
LL | VS(isize, <&'static [f64] as Deref>::Target),
2018-06-19 17:53:51 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[f64]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VS(isize, &<&'static [f64] as Deref>::Target),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VS(isize, Box<<&'static [f64] as Deref>::Target>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:69:21
|
2018-02-22 18:42:32 -06:00
LL | VT{u: isize, x: <&'static [i32] as Deref>::Target},
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[i32]`
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VT{u: isize, x: &<&'static [i32] as Deref>::Target},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VT{u: isize, x: Box<<&'static [i32] as Deref>::Target>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:43:8
|
LL | VI(Path1),
2018-06-19 17:53:51 -05:00
| ^^^^^ doesn't have a size known at compile-time
|
= help: within `Path1`, the trait `Sized` is not implemented for `(dyn PathHelper1 + 'static)`
note: required because it appears within the type `Path1`
--> $DIR/unsized-enum2.rs:16:8
|
LL | struct Path1(dyn PathHelper1);
| ^^^^^
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VI(&Path1),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VI(Box<Path1>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:45:11
|
LL | VJ{x: Path2},
| ^^^^^ doesn't have a size known at compile-time
|
= help: within `Path2`, the trait `Sized` is not implemented for `(dyn PathHelper2 + 'static)`
note: required because it appears within the type `Path2`
--> $DIR/unsized-enum2.rs:17:8
|
LL | struct Path2(dyn PathHelper2);
| ^^^^^
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VJ{x: &Path2},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VJ{x: Box<Path2>},
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time
2018-12-25 09:56:47 -06:00
--> $DIR/unsized-enum2.rs:47:15
|
LL | VK(isize, Path3),
2018-06-19 17:53:51 -05:00
| ^^^^^ doesn't have a size known at compile-time
|
= help: within `Path3`, the trait `Sized` is not implemented for `(dyn PathHelper3 + 'static)`
note: required because it appears within the type `Path3`
--> $DIR/unsized-enum2.rs:18:8
|
LL | struct Path3(dyn PathHelper3);
| ^^^^^
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VK(isize, &Path3),
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VK(isize, Box<Path3>),
| ++++ +
2018-07-10 16:10:13 -05:00
error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time
--> $DIR/unsized-enum2.rs:49:21
|
LL | VL{u: isize, x: Path4},
| ^^^^^ doesn't have a size known at compile-time
|
= help: within `Path4`, the trait `Sized` is not implemented for `(dyn PathHelper4 + 'static)`
note: required because it appears within the type `Path4`
--> $DIR/unsized-enum2.rs:19:8
|
LL | struct Path4(dyn PathHelper4);
| ^^^^^
= note: no field of an enum variant may have a dynamically sized type
= help: change the field's type to have a statically known size
help: borrowed types always have a statically known size
|
LL | VL{u: isize, x: &Path4},
| +
2020-07-14 14:18:01 -05:00
help: the `Box` type always has a statically known size and allocates its contents in the heap
|
LL | VL{u: isize, x: Box<Path4>},
| ++++ +
error: aborting due to 20 previous errors
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0277`.