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 | -- help: consider further restricting this bound: `Y: std::marker::Sized +`
8 | ^ doesn't have a size known at compile-time
10 = help: the trait `std::marker::Sized` is not implemented for `Y`
11 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
12 = note: all local variables must have a statically known size
13 = help: unsized locals are gated as an unstable feature
15 error[E0277]: the size for values of type `X` cannot be known at compilation time
16 --> $DIR/unsized6.rs:7:12
18 LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
19 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
20 LL | let _: W; // <-- this is OK, no bindings created, no initializer.
21 LL | let _: (isize, (X, isize));
22 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
24 = help: the trait `std::marker::Sized` is not implemented for `X`
25 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
26 = note: only the last element of a tuple may have a dynamically sized type
28 error[E0277]: the size for values of type `Z` cannot be known at compilation time
29 --> $DIR/unsized6.rs:11:12
31 LL | fn f1<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized>(x: &X) {
32 | -- help: consider further restricting this bound: `Z: std::marker::Sized +`
34 LL | let y: (isize, (Z, usize));
35 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
37 = help: the trait `std::marker::Sized` is not implemented for `Z`
38 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
39 = note: only the last element of a tuple may have a dynamically sized type
41 error[E0277]: the size for values of type `X` cannot be known at compilation time
42 --> $DIR/unsized6.rs:15:9
44 LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
45 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
47 | ^ doesn't have a size known at compile-time
49 = help: the trait `std::marker::Sized` is not implemented for `X`
50 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
51 = note: all local variables must have a statically known size
52 = help: unsized locals are gated as an unstable feature
54 error[E0277]: the size for values of type `Y` cannot be known at compilation time
55 --> $DIR/unsized6.rs:17:12
57 LL | fn f2<X: ?Sized, Y: ?Sized>(x: &X) {
58 | -- help: consider further restricting this bound: `Y: std::marker::Sized +`
60 LL | let y: (isize, (Y, isize));
61 | ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
63 = help: the trait `std::marker::Sized` is not implemented for `Y`
64 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
65 = note: only the last element of a tuple may have a dynamically sized type
67 error[E0277]: the size for values of type `X` cannot be known at compilation time
68 --> $DIR/unsized6.rs:22:9
70 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
71 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
73 | ^ doesn't have a size known at compile-time
75 = help: the trait `std::marker::Sized` is not implemented for `X`
76 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
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:24:9
83 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
84 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
87 | ^ doesn't have a size known at compile-time
89 = help: the trait `std::marker::Sized` is not implemented for `X`
90 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
91 = note: all local variables must have a statically known size
92 = help: unsized locals are gated as an unstable feature
94 error[E0277]: the size for values of type `X` cannot be known at compilation time
95 --> $DIR/unsized6.rs:26:10
97 LL | fn f3<X: ?Sized>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
98 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
100 LL | let (y, z) = (*x3, 4);
101 | ^ doesn't have a size known at compile-time
103 = help: the trait `std::marker::Sized` is not implemented for `X`
104 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
105 = note: all local variables must have a statically known size
106 = help: unsized locals are gated as an unstable feature
108 error[E0277]: the size for values of type `X` cannot be known at compilation time
109 --> $DIR/unsized6.rs:30:9
111 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
112 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
114 | ^ doesn't have a size known at compile-time
116 = help: the trait `std::marker::Sized` is not implemented for `X`
117 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
118 = note: all local variables must have a statically known size
119 = help: unsized locals are gated as an unstable feature
121 error[E0277]: the size for values of type `X` cannot be known at compilation time
122 --> $DIR/unsized6.rs:32:9
124 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
125 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
128 | ^ doesn't have a size known at compile-time
130 = help: the trait `std::marker::Sized` is not implemented for `X`
131 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
132 = note: all local variables must have a statically known size
133 = help: unsized locals are gated as an unstable feature
135 error[E0277]: the size for values of type `X` cannot be known at compilation time
136 --> $DIR/unsized6.rs:34:10
138 LL | fn f4<X: ?Sized + T>(x1: Box<X>, x2: Box<X>, x3: Box<X>) {
139 | -- help: consider further restricting this bound: `X: std::marker::Sized +`
141 LL | let (y, z) = (*x3, 4);
142 | ^ doesn't have a size known at compile-time
144 = help: the trait `std::marker::Sized` is not implemented for `X`
145 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
146 = note: all local variables must have a statically known size
147 = help: unsized locals are gated as an unstable feature
149 error[E0277]: the size for values of type `X` cannot be known at compilation time
150 --> $DIR/unsized6.rs:38:18
152 LL | fn g1<X: ?Sized>(x: X) {}
153 | -- ^ doesn't have a size known at compile-time
155 | help: consider further restricting this bound: `X: std::marker::Sized +`
157 = help: the trait `std::marker::Sized` is not implemented for `X`
158 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
159 = note: all local variables must have a statically known size
160 = help: unsized locals are gated as an unstable feature
162 error[E0277]: the size for values of type `X` cannot be known at compilation time
163 --> $DIR/unsized6.rs:40:22
165 LL | fn g2<X: ?Sized + T>(x: X) {}
166 | -- ^ doesn't have a size known at compile-time
168 | help: consider further restricting this bound: `X: std::marker::Sized +`
170 = help: the trait `std::marker::Sized` is not implemented for `X`
171 = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
172 = note: all local variables must have a statically known size
173 = help: unsized locals are gated as an unstable feature
175 error: aborting due to 13 previous errors
177 For more information about this error, try `rustc --explain E0277`.