fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #69854 - pietroalbini:stable-next, r=Centrilb8cedc00407

1.42.0
11.4 KiB219 linesraw
1error[E0277]: the size for values of type `W` cannot be known at compilation time
2  --> $DIR/unsized-enum2.rs:23:8
3   |
4LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
5   |        -- help: consider further restricting this bound: `W: std::marker::Sized +`
6LL |     // parameter
7LL |     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
14error[E0277]: the size for values of type `X` cannot be known at compilation time
15  --> $DIR/unsized-enum2.rs:25:8
16   |
17LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
18   |                   -- help: consider further restricting this bound: `X: std::marker::Sized +`
19...
20LL |     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
27error[E0277]: the size for values of type `Y` cannot be known at compilation time
28  --> $DIR/unsized-enum2.rs:27:15
29   |
30LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
31   |                              -- help: consider further restricting this bound: `Y: std::marker::Sized +`
32...
33LL |     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
40error[E0277]: the size for values of type `Z` cannot be known at compilation time
41  --> $DIR/unsized-enum2.rs:29:18
42   |
43LL | enum E<W: ?Sized, X: ?Sized, Y: ?Sized, Z: ?Sized> {
44   |                                         -- help: consider further restricting this bound: `Z: std::marker::Sized +`
45...
46LL |     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
53error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
54  --> $DIR/unsized-enum2.rs:33:8
55   |
56LL |     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
63error[E0277]: the size for values of type `str` cannot be known at compilation time
64  --> $DIR/unsized-enum2.rs:35:8
65   |
66LL |     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
73error[E0277]: the size for values of type `[f32]` cannot be known at compilation time
74  --> $DIR/unsized-enum2.rs:37:15
75   |
76LL |     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
83error[E0277]: the size for values of type `[u32]` cannot be known at compilation time
84  --> $DIR/unsized-enum2.rs:39:18
85   |
86LL |     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
93error[E0277]: the size for values of type `(dyn Foo + 'static)` cannot be known at compilation time
94  --> $DIR/unsized-enum2.rs:53:8
95   |
96LL |     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
103error[E0277]: the size for values of type `(dyn Bar + 'static)` cannot be known at compilation time
104  --> $DIR/unsized-enum2.rs:55:8
105   |
106LL |     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
113error[E0277]: the size for values of type `(dyn FooBar + 'static)` cannot be known at compilation time
114  --> $DIR/unsized-enum2.rs:57:15
115   |
116LL |     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
123error[E0277]: the size for values of type `(dyn BarFoo + 'static)` cannot be known at compilation time
124  --> $DIR/unsized-enum2.rs:59:18
125   |
126LL |     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
133error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
134  --> $DIR/unsized-enum2.rs:63:8
135   |
136LL |     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
143error[E0277]: the size for values of type `[char]` cannot be known at compilation time
144  --> $DIR/unsized-enum2.rs:65:8
145   |
146LL |     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
153error[E0277]: the size for values of type `[f64]` cannot be known at compilation time
154  --> $DIR/unsized-enum2.rs:67:15
155   |
156LL |     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
163error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
164  --> $DIR/unsized-enum2.rs:69:18
165   |
166LL |     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
173error[E0277]: the size for values of type `(dyn PathHelper1 + 'static)` cannot be known at compilation time
174  --> $DIR/unsized-enum2.rs:43:8
175   |
176LL |     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
184error[E0277]: the size for values of type `(dyn PathHelper2 + 'static)` cannot be known at compilation time
185  --> $DIR/unsized-enum2.rs:45:8
186   |
187LL |     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
195error[E0277]: the size for values of type `(dyn PathHelper3 + 'static)` cannot be known at compilation time
196  --> $DIR/unsized-enum2.rs:47:15
197   |
198LL |     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
206error[E0277]: the size for values of type `(dyn PathHelper4 + 'static)` cannot be known at compilation time
207  --> $DIR/unsized-enum2.rs:49:18
208   |
209LL |     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
217error: aborting due to 20 previous errors
218
219For more information about this error, try `rustc --explain E0277`.