1 error[E0277]: the size for values of type `X` cannot be known at compilation time
2 --> $DIR/unsized5.rs:4:5
4 LL | struct S1<X: ?Sized> {
5 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
7 | ^^^^^ doesn't have a size known at compile-time
9 = help: the trait `std::marker::Sized` is not implemented for `X`
10 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
11 = note: only the last field of a struct may have a dynamically sized type
13 error[E0277]: the size for values of type `X` cannot be known at compilation time
14 --> $DIR/unsized5.rs:10:5
16 LL | struct S2<X: ?Sized> {
17 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
20 | ^^^^ doesn't have a size known at compile-time
22 = help: the trait `std::marker::Sized` is not implemented for `X`
23 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
24 = note: only the last field of a struct may have a dynamically sized type
26 error[E0277]: the size for values of type `str` cannot be known at compilation time
27 --> $DIR/unsized5.rs:15:5
30 | ^^^^^^ doesn't have a size known at compile-time
32 = help: the trait `std::marker::Sized` is not implemented for `str`
33 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
34 = note: only the last field of a struct may have a dynamically sized type
36 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
37 --> $DIR/unsized5.rs:20:5
40 | ^^^^^^^ doesn't have a size known at compile-time
42 = help: the trait `std::marker::Sized` is not implemented for `[u8]`
43 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
44 = note: only the last field of a struct may have a dynamically sized type
46 error[E0277]: the size for values of type `X` cannot be known at compilation time
47 --> $DIR/unsized5.rs:25:8
49 LL | enum E<X: ?Sized> {
50 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
52 | ^ doesn't have a size known at compile-time
54 = help: the trait `std::marker::Sized` is not implemented for `X`
55 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
56 = note: no field of an enum variant may have a dynamically sized type
58 error[E0277]: the size for values of type `X` cannot be known at compilation time
59 --> $DIR/unsized5.rs:29:8
61 LL | enum F<X: ?Sized> {
62 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
63 LL | V2{f1: X, f: isize},
64 | ^^^^^ doesn't have a size known at compile-time
66 = help: the trait `std::marker::Sized` is not implemented for `X`
67 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
68 = note: no field of an enum variant may have a dynamically sized type
70 error: aborting due to 6 previous errors
72 For more information about this error, try `rustc --explain E0277`.