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 help: consider relaxing the implicit `Sized` restriction
15 LL | fn f2<X: ?Sized>(x: &X) {
18 error[E0277]: the size for values of type `X` cannot be known at compilation time
19 --> $DIR/unsized3.rs:18:13
21 LL | fn f3<X: ?Sized + T>(x: &X) {
22 | - this type parameter needs to be `std::marker::Sized`
24 | ^ doesn't have a size known at compile-time
26 LL | fn f4<X: T>(x: &X) {
27 | - required by this bound in `f4`
29 = help: the trait `std::marker::Sized` is not implemented for `X`
30 help: consider relaxing the implicit `Sized` restriction
32 LL | fn f4<X: T + ?Sized>(x: &X) {
35 error[E0277]: the size for values of type `X` cannot be known at compilation time
36 --> $DIR/unsized3.rs:33:8
38 LL | fn f5<Y>(x: &Y) {}
39 | - required by this bound in `f5`
41 LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
42 | - this type parameter needs to be `std::marker::Sized`
44 | ^^ doesn't have a size known at compile-time
46 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
47 = note: required because it appears within the type `S<X>`
48 help: consider relaxing the implicit `Sized` restriction
50 LL | fn f5<Y: ?Sized>(x: &Y) {}
53 error[E0277]: the size for values of type `X` cannot be known at compilation time
54 --> $DIR/unsized3.rs:40:8
56 LL | fn f9<X: ?Sized>(x1: Box<S<X>>) {
57 | - this type parameter needs to be `std::marker::Sized`
59 | ^^^^^^^^^^ doesn't have a size known at compile-time
61 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
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: required because it appears within the type `S<X>`
75 = note: required because it appears within the type `({integer}, S<X>)`
76 = note: tuples must have a statically known size to be initialized
78 error[E0277]: the size for values of type `X` cannot be known at compilation time
79 --> $DIR/unsized3.rs:45:8
81 LL | fn f5<Y>(x: &Y) {}
82 | - required by this bound in `f5`
84 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
85 | - this type parameter needs to be `std::marker::Sized`
87 | ^^^^^^^^^^ doesn't have a size known at compile-time
89 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
90 = note: required because it appears within the type `S<X>`
91 = note: required because it appears within the type `({integer}, S<X>)`
92 help: consider relaxing the implicit `Sized` restriction
94 LL | fn f5<Y: ?Sized>(x: &Y) {}
97 error: aborting due to 6 previous errors
99 For more information about this error, try `rustc --explain E0277`.