]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unsized/unsized-enum2.stderr
bc3b3831f32699ed06c2fe6699b99150a2805ede
[rust.git] / src / test / ui / unsized / unsized-enum2.stderr
1 error[E0277]: the size for values of type `W` cannot be known at compilation time
2   --> $DIR/unsized-enum2.rs:23:8
3    |
4 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
5    |        - this type parameter needs to be `std::marker::Sized`
6 LL |     // parameter
7 LL |     VA(W),
8    |        ^ doesn't have a size known at compile-time
9    |
10    = help: the trait `std::marker::Sized` is not implemented for `W`
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: no field of an enum variant may have a dynamically sized type
13
14 error[E0277]: the size for values of type `X` cannot be known at compilation time
15   --> $DIR/unsized-enum2.rs:25:8
16    |
17 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
18    |                   - this type parameter needs to be `std::marker::Sized`
19 ...
20 LL |     VB{x: X},
21    |        ^^^^ doesn't have a size known at compile-time
22    |
23    = help: the trait `std::marker::Sized` is not implemented for `X`
24    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
25    = note: no field of an enum variant may have a dynamically sized type
26
27 error[E0277]: the size for values of type `Y` cannot be known at compilation time
28   --> $DIR/unsized-enum2.rs:27:15
29    |
30 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
31    |                              - this type parameter needs to be `std::marker::Sized`
32 ...
33 LL |     VC(isize, Y),
34    |               ^ doesn't have a size known at compile-time
35    |
36    = help: the trait `std::marker::Sized` is not implemented for `Y`
37    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
38    = note: no field of an enum variant may have a dynamically sized type
39
40 error[E0277]: the size for values of type `Z` cannot be known at compilation time
41   --> $DIR/unsized-enum2.rs:29:18
42    |
43 LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
44    |                                         - this type parameter needs to be `std::marker::Sized`
45 ...
46 LL |     VD{u: isize, x: Z},
47    |                  ^^^^ doesn't have a size known at compile-time
48    |
49    = help: the trait `std::marker::Sized` is not implemented for `Z`
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: no field of an enum variant may have a dynamically sized type
52
53 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
54   --> $DIR/unsized-enum2.rs:33:8
55    |
56 LL |     VE([u8]),
57    |        ^^^^ doesn't have a size known at compile-time
58    |
59    = help: the trait `std::marker::Sized` is not implemented for `[u8]`
60    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
61    = note: no field of an enum variant may have a dynamically sized type
62
63 error[E0277]: the size for values of type `str` cannot be known at compilation time
64   --> $DIR/unsized-enum2.rs:35:8
65    |
66 LL |     VF{x: str},
67    |        ^^^^^^ doesn't have a size known at compile-time
68    |
69    = help: the trait `std::marker::Sized` is not implemented for `str`
70    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
71    = note: no field of an enum variant may have a dynamically sized type
72
73 error[E0277]: the size for values of type `[f32]` cannot be known at compilation time
74   --> $DIR/unsized-enum2.rs:37:15
75    |
76 LL |     VG(isize, [f32]),
77    |               ^^^^^ doesn't have a size known at compile-time
78    |
79    = help: the trait `std::marker::Sized` is not implemented for `[f32]`
80    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
81    = note: no field of an enum variant may have a dynamically sized type
82
83 error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
84   --> $DIR/unsized-enum2.rs:39:18
85    |
86 LL |     VH{u: isize, x: [u32]},
87    |                  ^^^^^^^^ doesn't have a size known at compile-time
88    |
89    = help: the trait `std::marker::Sized` is not implemented for `[u32]`
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: no field of an enum variant may have a dynamically sized type
92
93 error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
94   --> $DIR/unsized-enum2.rs:53:8
95    |
96 LL |     VM(dyn Foo),
97    |        ^^^^^^^ doesn't have a size known at compile-time
98    |
99    = help: the trait `std::marker::Sized` is not implemented for `(dyn Foo + 'static)`
100    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
101    = note: no field of an enum variant may have a dynamically sized type
102
103 error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
104   --> $DIR/unsized-enum2.rs:55:8
105    |
106 LL |     VN{x: dyn Bar},
107    |        ^^^^^^^^^^ doesn't have a size known at compile-time
108    |
109    = help: the trait `std::marker::Sized` is not implemented for `(dyn Bar + 'static)`
110    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
111    = note: no field of an enum variant may have a dynamically sized type
112
113 error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
114   --> $DIR/unsized-enum2.rs:57:15
115    |
116 LL |     VO(isize, dyn FooBar),
117    |               ^^^^^^^^^^ doesn't have a size known at compile-time
118    |
119    = help: the trait `std::marker::Sized` is not implemented for `(dyn FooBar + 'static)`
120    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
121    = note: no field of an enum variant may have a dynamically sized type
122
123 error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
124   --> $DIR/unsized-enum2.rs:59:18
125    |
126 LL |     VP{u: isize, x: dyn BarFoo},
127    |                  ^^^^^^^^^^^^^ doesn't have a size known at compile-time
128    |
129    = help: the trait `std::marker::Sized` is not implemented for `(dyn BarFoo + 'static)`
130    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
131    = note: no field of an enum variant may have a dynamically sized type
132
133 error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
134   --> $DIR/unsized-enum2.rs:63:8
135    |
136 LL |     VQ(<&'static [i8] as Deref>::Target),
137    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
138    |
139    = help: the trait `std::marker::Sized` is not implemented for `[i8]`
140    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
141    = note: no field of an enum variant may have a dynamically sized type
142
143 error[E0277]: the size for values of type `[char]` cannot be known at compilation time
144   --> $DIR/unsized-enum2.rs:65:8
145    |
146 LL |     VR{x: <&'static [char] as Deref>::Target},
147    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
148    |
149    = help: the trait `std::marker::Sized` is not implemented for `[char]`
150    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
151    = note: no field of an enum variant may have a dynamically sized type
152
153 error[E0277]: the size for values of type `[f64]` cannot be known at compilation time
154   --> $DIR/unsized-enum2.rs:67:15
155    |
156 LL |     VS(isize, <&'static [f64] as Deref>::Target),
157    |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
158    |
159    = help: the trait `std::marker::Sized` is not implemented for `[f64]`
160    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
161    = note: no field of an enum variant may have a dynamically sized type
162
163 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
164   --> $DIR/unsized-enum2.rs:69:18
165    |
166 LL |     VT{u: isize, x: <&'static [i32] as Deref>::Target},
167    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
168    |
169    = help: the trait `std::marker::Sized` is not implemented for `[i32]`
170    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
171    = note: no field of an enum variant may have a dynamically sized type
172
173 error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time
174   --> $DIR/unsized-enum2.rs:43:8
175    |
176 LL |     VI(Path1),
177    |        ^^^^^ doesn't have a size known at compile-time
178    |
179    = help: within `Path1`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper1 + 'static)`
180    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
181    = note: required because it appears within the type `Path1`
182    = note: no field of an enum variant may have a dynamically sized type
183
184 error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time
185   --> $DIR/unsized-enum2.rs:45:8
186    |
187 LL |     VJ{x: Path2},
188    |        ^^^^^^^^ doesn't have a size known at compile-time
189    |
190    = help: within `Path2`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper2 + 'static)`
191    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
192    = note: required because it appears within the type `Path2`
193    = note: no field of an enum variant may have a dynamically sized type
194
195 error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time
196   --> $DIR/unsized-enum2.rs:47:15
197    |
198 LL |     VK(isize, Path3),
199    |               ^^^^^ doesn't have a size known at compile-time
200    |
201    = help: within `Path3`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper3 + 'static)`
202    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
203    = note: required because it appears within the type `Path3`
204    = note: no field of an enum variant may have a dynamically sized type
205
206 error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time
207   --> $DIR/unsized-enum2.rs:49:18
208    |
209 LL |     VL{u: isize, x: Path4},
210    |                  ^^^^^^^^ doesn't have a size known at compile-time
211    |
212    = help: within `Path4`, the trait `std::marker::Sized` is not implemented for `(dyn PathHelper4 + 'static)`
213    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
214    = note: required because it appears within the type `Path4`
215    = note: no field of an enum variant may have a dynamically sized type
216
217 error: aborting due to 20 previous errors
218
219 For more information about this error, try `rustc --explain E0277`.