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