1 error[E0277]: the size for values of type `X` cannot be known at compilation time
2 --> $DIR/unsized3.rs:7:13
4 LL | fn f1<X: ?Sized>(x: &X) {
5 | - this type parameter needs to be `std::marker::Sized`
7 | ^ doesn't have a size known at compile-time
10 | - required by this bound in `f2`
12 = help: the trait `std::marker::Sized` is not implemented for `X`
13 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14 help: consider relaxing the implicit `Sized` restriction
16 LL | fn f2<X: ?Sized>(x: &X) {
19 error[E0277]: the size for values of type `X` cannot be known at compilation time
20 --> $DIR/unsized3.rs:18:13
22 LL | fn f3<X: ?Sized + T>(x: &X) {
23 | - this type parameter needs to be `std::marker::Sized`
25 | ^ doesn't have a size known at compile-time
27 LL | fn f4<X: T>(x: &X) {
28 | - required by this bound in `f4`
30 = help: the trait `std::marker::Sized` is not implemented for `X`
31 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
32 help: consider relaxing the implicit `Sized` restriction
34 LL | fn f4<X: T + ?Sized>(x: &X) {
37 error[E0277]: the size for values of type `X` cannot be known at compilation time
38 --> $DIR/unsized3.rs:33:8
40 LL | fn f5<Y>(x: &Y) {}
41 | - required by this bound in `f5`
43 LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
44 | - this type parameter needs to be `std::marker::Sized`
46 | ^^ doesn't have a size known at compile-time
48 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
49 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
50 = note: required because it appears within the type `S<X>`
52 error[E0277]: the size for values of type `X` cannot be known at compilation time
53 --> $DIR/unsized3.rs:40:8
55 LL | fn f9<X: ?Sized>(x1: Box<S<X>>) {
56 | - this type parameter needs to be `std::marker::Sized`
58 | ^^^^^^^^^^ doesn't have a size known at compile-time
60 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
61 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
62 = note: required because it appears within the type `S<X>`
63 = note: only the last element of a tuple may have a dynamically sized type
65 error[E0277]: the size for values of type `X` cannot be known at compilation time
66 --> $DIR/unsized3.rs:45:9
68 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
69 | - this type parameter needs to be `std::marker::Sized`
71 | ^^^^^^^^^ doesn't have a size known at compile-time
73 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
74 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
75 = note: required because it appears within the type `S<X>`
76 = note: required because it appears within the type `({integer}, S<X>)`
77 = note: tuples must have a statically known size to be initialized
79 error[E0277]: the size for values of type `X` cannot be known at compilation time
80 --> $DIR/unsized3.rs:45:8
82 LL | fn f5<Y>(x: &Y) {}
83 | - required by this bound in `f5`
85 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
86 | - this type parameter needs to be `std::marker::Sized`
88 | ^^^^^^^^^^ doesn't have a size known at compile-time
90 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
91 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
92 = note: required because it appears within the type `S<X>`
93 = note: required because it appears within the type `({integer}, S<X>)`
95 error: aborting due to 6 previous errors
97 For more information about this error, try `rustc --explain E0277`.