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: consider relaxing the implicit `Sized` restriction
14 LL | fn f2<X: ?Sized>(x: &X) {
17 error[E0277]: the size for values of type `X` cannot be known at compilation time
18 --> $DIR/unsized3.rs:18:13
20 LL | fn f3<X: ?Sized + T>(x: &X) {
21 | - this type parameter needs to be `std::marker::Sized`
23 | ^ doesn't have a size known at compile-time
25 LL | fn f4<X: T>(x: &X) {
26 | - required by this bound in `f4`
28 help: consider relaxing the implicit `Sized` restriction
30 LL | fn f4<X: T + ?Sized>(x: &X) {
33 error[E0277]: the size for values of type `X` cannot be known at compilation time
34 --> $DIR/unsized3.rs:33:8
36 LL | fn f5<Y>(x: &Y) {}
37 | - required by this bound in `f5`
39 LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
40 | - this type parameter needs to be `std::marker::Sized`
42 | ^^ doesn't have a size known at compile-time
44 note: required because it appears within the type `S<X>`
45 --> $DIR/unsized3.rs:28:8
47 LL | struct S<X: ?Sized> {
49 help: consider relaxing the implicit `Sized` restriction
51 LL | fn f5<Y: ?Sized>(x: &Y) {}
54 error[E0277]: the size for values of type `X` cannot be known at compilation time
55 --> $DIR/unsized3.rs:40:8
57 LL | fn f9<X: ?Sized>(x1: Box<S<X>>) {
58 | - this type parameter needs to be `std::marker::Sized`
60 | ^^^^^^^^^^ doesn't have a size known at compile-time
62 note: required because it appears within the type `S<X>`
63 --> $DIR/unsized3.rs:28:8
65 LL | struct S<X: ?Sized> {
67 = note: only the last element of a tuple may have a dynamically sized type
69 error[E0277]: the size for values of type `X` cannot be known at compilation time
70 --> $DIR/unsized3.rs:45:9
72 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
73 | - this type parameter needs to be `std::marker::Sized`
75 | ^^^^^^^^^ doesn't have a size known at compile-time
77 note: required because it appears within the type `S<X>`
78 --> $DIR/unsized3.rs:28:8
80 LL | struct S<X: ?Sized> {
82 = note: required because it appears within the type `({integer}, S<X>)`
83 = note: tuples must have a statically known size to be initialized
85 error[E0277]: the size for values of type `X` cannot be known at compilation time
86 --> $DIR/unsized3.rs:45:8
88 LL | fn f5<Y>(x: &Y) {}
89 | - required by this bound in `f5`
91 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
92 | - this type parameter needs to be `std::marker::Sized`
94 | ^^^^^^^^^^ doesn't have a size known at compile-time
96 note: required because it appears within the type `S<X>`
97 --> $DIR/unsized3.rs:28:8
99 LL | struct S<X: ?Sized> {
101 = note: required because it appears within the type `({integer}, S<X>)`
102 help: consider relaxing the implicit `Sized` restriction
104 LL | fn f5<Y: ?Sized>(x: &Y) {}
107 error: aborting due to 6 previous errors
109 For more information about this error, try `rustc --explain E0277`.