1 error[E0277]: the size for values of type `Y` cannot be known at compilation time
2 --> $DIR/unsized6.rs:9:9
4 LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
5 | - this type parameter needs to be `Sized`
8 | ^ doesn't have a size known at compile-time
10 = note: all local variables must have a statically known size
11 = help: unsized locals are gated as an unstable feature
13 error[E0277]: the size for values of type `X` cannot be known at compilation time
14 --> $DIR/unsized6.rs:7:12
16 LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
17 | - this type parameter needs to be `Sized`
18 LL | let _: W; // <-- this is OK, no bindings created, no initializer.
19 LL | let _: (isize, (X, isize));
20 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
22 = note: only the last element of a tuple may have a dynamically sized type
24 error[E0277]: the size for values of type `Z` cannot be known at compilation time
25 --> $DIR/unsized6.rs:11:12
27 LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
28 | - this type parameter needs to be `Sized`
30 LL | let y: (isize, (Z, usize));
31 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
33 = note: only the last element of a tuple may have a dynamically sized type
35 error[E0277]: the size for values of type `X` cannot be known at compilation time
36 --> $DIR/unsized6.rs:15:9
38 LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
39 | - this type parameter needs to be `Sized`
41 | ^ doesn't have a size known at compile-time
43 = note: all local variables must have a statically known size
44 = help: unsized locals are gated as an unstable feature
46 error[E0277]: the size for values of type `Y` cannot be known at compilation time
47 --> $DIR/unsized6.rs:17:12
49 LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
50 | - this type parameter needs to be `Sized`
52 LL | let y: (isize, (Y, isize));
53 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
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/unsized6.rs:22:9
60 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
61 | - this type parameter needs to be `Sized`
63 | ^ doesn't have a size known at compile-time
65 = note: all local variables must have a statically known size
66 = help: unsized locals are gated as an unstable feature
68 error[E0277]: the size for values of type `X` cannot be known at compilation time
69 --> $DIR/unsized6.rs:24:9
71 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
72 | - this type parameter needs to be `Sized`
75 | ^ doesn't have a size known at compile-time
77 = note: all local variables must have a statically known size
78 = help: unsized locals are gated as an unstable feature
80 error[E0277]: the size for values of type `X` cannot be known at compilation time
81 --> $DIR/unsized6.rs:26:10
83 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
84 | - this type parameter needs to be `Sized`
86 LL | let (y, z) = (*x3, 4);
87 | ^ doesn't have a size known at compile-time
89 = note: all local variables must have a statically known size
90 = help: unsized locals are gated as an unstable feature
92 error[E0277]: the size for values of type `X` cannot be known at compilation time
93 --> $DIR/unsized6.rs:30:9
95 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
96 | - this type parameter needs to be `Sized`
98 | ^ doesn't have a size known at compile-time
100 = note: all local variables must have a statically known size
101 = help: unsized locals are gated as an unstable feature
103 error[E0277]: the size for values of type `X` cannot be known at compilation time
104 --> $DIR/unsized6.rs:32:9
106 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
107 | - this type parameter needs to be `Sized`
110 | ^ doesn't have a size known at compile-time
112 = note: all local variables must have a statically known size
113 = help: unsized locals are gated as an unstable feature
115 error[E0277]: the size for values of type `X` cannot be known at compilation time
116 --> $DIR/unsized6.rs:34:10
118 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
119 | - this type parameter needs to be `Sized`
121 LL | let (y, z) = (*x3, 4);
122 | ^ doesn't have a size known at compile-time
124 = note: all local variables must have a statically known size
125 = help: unsized locals are gated as an unstable feature
127 error[E0277]: the size for values of type `X` cannot be known at compilation time
128 --> $DIR/unsized6.rs:38:18
130 LL | fn g1<X: ?Sized>(x: X) {}
131 | - ^ doesn't have a size known at compile-time
133 | this type parameter needs to be `Sized`
135 = help: unsized locals are gated as an unstable feature
136 help: function arguments must have a statically known size, borrowed types always have a known size
138 LL | fn g1<X: ?Sized>(x: &X) {}
141 error[E0277]: the size for values of type `X` cannot be known at compilation time
142 --> $DIR/unsized6.rs:40:22
144 LL | fn g2<X: ?Sized + T>(x: X) {}
145 | - ^ doesn't have a size known at compile-time
147 | this type parameter needs to be `Sized`
149 = help: unsized locals are gated as an unstable feature
150 help: function arguments must have a statically known size, borrowed types always have a known size
152 LL | fn g2<X: ?Sized + T>(x: &X) {}
155 error: aborting due to 13 previous errors
157 For more information about this error, try `rustc --explain E0277`.