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 | -- help: consider further restricting this bound: `X: 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>
15 error[E0277]: the size for values of type `X` cannot be known at compilation time
16 --> $DIR/unsized3.rs:18:13
18 LL | fn f3<X: ?Sized + T>(x: &X) {
19 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
21 | ^ doesn't have a size known at compile-time
23 LL | fn f4<X: T>(x: &X) {
24 | -- - required by this bound in `f4`
26 = help: the trait `std::marker::Sized` is not implemented for `X`
27 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
29 error[E0277]: the size for values of type `X` cannot be known at compilation time
30 --> $DIR/unsized3.rs:33:8
32 LL | fn f5<Y>(x: &Y) {}
33 | -- - required by this bound in `f5`
35 LL | fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
36 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
38 | ^^ doesn't have a size known at compile-time
40 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
41 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
42 = note: required because it appears within the type `S<X>`
44 error[E0277]: the size for values of type `X` cannot be known at compilation time
45 --> $DIR/unsized3.rs:40:8
47 LL | fn f9<X: ?Sized>(x1: Box<S<X>>) {
48 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
50 | ^^^^^^^^^^ doesn't have a size known at compile-time
52 = help: within `S<X>`, the trait `std::marker::Sized` is not implemented for `X`
53 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
54 = note: required because it appears within the type `S<X>`
55 = note: only the last element of a tuple may have a dynamically sized type
57 error[E0277]: the size for values of type `X` cannot be known at compilation time
58 --> $DIR/unsized3.rs:45:9
60 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
61 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
63 | ^^^^^^^^^ doesn't have a size known at compile-time
65 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
66 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
67 = note: required because it appears within the type `S<X>`
68 = note: required because it appears within the type `({integer}, S<X>)`
69 = note: tuples must have a statically known size to be initialized
71 error[E0277]: the size for values of type `X` cannot be known at compilation time
72 --> $DIR/unsized3.rs:45:8
74 LL | fn f5<Y>(x: &Y) {}
75 | -- - required by this bound in `f5`
77 LL | fn f10<X: ?Sized>(x1: Box<S<X>>) {
78 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
80 | ^^^^^^^^^^ doesn't have a size known at compile-time
82 = help: within `({integer}, S<X>)`, the trait `std::marker::Sized` is not implemented for `X`
83 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
84 = note: required because it appears within the type `S<X>`
85 = note: required because it appears within the type `({integer}, S<X>)`
87 error: aborting due to 6 previous errors
89 For more information about this error, try `rustc --explain E0277`.