Debian Codegraph @

debian/missing-sources/zerocopy-derive/tests/ui-stable/enum.stderr

raw
1 error: unrecognized representation hint
2 --> tests/ui-stable/enum.rs:20:8
3 |
4 20 | #[repr("foo")]
5 | ^^^^^
6
7 error: unrecognized representation hint
8 --> tests/ui-stable/enum.rs:27:8
9 |
10 27 | #[repr(foo)]
11 | ^^^
12
13 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
14 --> tests/ui-stable/enum.rs:32:10
15 |
16 32 | #[derive(FromBytes)]
17 | ^^^^^^^^^
18 |
19 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
20
21 error: this conflicts with another representation hint
22 --> tests/ui-stable/enum.rs:41:12
23 |
24 41 | #[repr(u8, u16)]
25 | ^^^
26
27 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
28 --> tests/ui-stable/enum.rs:46:10
29 |
30 46 | #[derive(FromBytes)]
31 | ^^^^^^^^^
32 |
33 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
34
35 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
36 --> tests/ui-stable/enum.rs:78:1
37 |
38 78 | #[zerocopy(crate = "zerocopy_renamed")]
39 | ^
40
41 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
42 --> tests/ui-stable/enum.rs:84:1
43 |
44 84 | #[zerocopy(crate = "zerocopy_renamed")]
45 | ^
46
47 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
48 --> tests/ui-stable/enum.rs:104:1
49 |
50 104 | #[zerocopy(crate = "zerocopy_renamed")]
51 | ^
52
53 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
54 --> tests/ui-stable/enum.rs:110:1
55 |
56 110 | #[zerocopy(crate = "zerocopy_renamed")]
57 | ^
58
59 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
60 --> tests/ui-stable/enum.rs:117:1
61 |
62 117 | #[zerocopy(crate = "zerocopy_renamed")]
63 | ^
64
65 error: FromZeros only supported on enums with a variant that has a discriminant of `0`
66 --> tests/ui-stable/enum.rs:124:1
67 |
68 124 | / #[zerocopy(crate = "zerocopy_renamed")]
69 125 | | #[repr(u8)]
70 126 | | enum FromZeros4 {
71 127 | | A = 1,
72 128 | | B = 2,
73 129 | | }
74 | |_^
75
76 error: FromZeros only supported on enums with a variant that has a discriminant of `0`
77 help: This enum has discriminants which are not literal integers. One of those may define or imply which variant has a discriminant of zero. Use a literal integer to define or imply the variant with a discriminant of zero.
78 --> tests/ui-stable/enum.rs:134:1
79 |
80 134 | / #[zerocopy(crate = "zerocopy_renamed")]
81 135 | | #[repr(i8)]
82 136 | | enum FromZeros5 {
83 137 | | A = NEGATIVE_ONE,
84 138 | | B,
85 139 | | }
86 | |_^
87
88 error: FromZeros only supported on enums with a variant that has a discriminant of `0`
89 --> tests/ui-stable/enum.rs:151:1
90 |
91 151 | / #[zerocopy(crate = "zerocopy_renamed")]
92 152 | | #[repr(u8)]
93 153 | | enum FromZeros7 {
94 154 | | A = 1,
95 155 | | B(NotFromZeros),
96 156 | | }
97 | |_^
98
99 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
100 --> tests/ui-stable/enum.rs:162:10
101 |
102 162 | #[derive(FromBytes)]
103 | ^^^^^^^^^
104 |
105 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
106
107 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
108 --> tests/ui-stable/enum.rs:170:8
109 |
110 170 | #[repr(C)]
111 | ^
112
113 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
114 --> tests/ui-stable/enum.rs:177:8
115 |
116 177 | #[repr(usize)]
117 | ^^^^^
118
119 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
120 --> tests/ui-stable/enum.rs:184:8
121 |
122 184 | #[repr(isize)]
123 | ^^^^^
124
125 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
126 --> tests/ui-stable/enum.rs:191:8
127 |
128 191 | #[repr(u32)]
129 | ^^^
130
131 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
132 --> tests/ui-stable/enum.rs:198:8
133 |
134 198 | #[repr(i32)]
135 | ^^^
136
137 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
138 --> tests/ui-stable/enum.rs:205:8
139 |
140 205 | #[repr(u64)]
141 | ^^^
142
143 error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16`
144 --> tests/ui-stable/enum.rs:212:8
145 |
146 212 | #[repr(i64)]
147 | ^^^
148
149 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
150 --> tests/ui-stable/enum.rs:483:10
151 |
152 483 | #[derive(Unaligned)]
153 | ^^^^^^^^^
154 |
155 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
156
157 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
158 --> tests/ui-stable/enum.rs:490:10
159 |
160 490 | #[derive(Unaligned)]
161 | ^^^^^^^^^
162 |
163 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
164
165 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
166 --> tests/ui-stable/enum.rs:497:10
167 |
168 497 | #[derive(Unaligned)]
169 | ^^^^^^^^^
170 |
171 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
172
173 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
174 --> tests/ui-stable/enum.rs:504:10
175 |
176 504 | #[derive(Unaligned)]
177 | ^^^^^^^^^
178 |
179 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
180
181 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
182 --> tests/ui-stable/enum.rs:511:10
183 |
184 511 | #[derive(Unaligned)]
185 | ^^^^^^^^^
186 |
187 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
188
189 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
190 --> tests/ui-stable/enum.rs:518:10
191 |
192 518 | #[derive(Unaligned)]
193 | ^^^^^^^^^
194 |
195 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
196
197 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
198 --> tests/ui-stable/enum.rs:525:10
199 |
200 525 | #[derive(Unaligned)]
201 | ^^^^^^^^^
202 |
203 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
204
205 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
206 --> tests/ui-stable/enum.rs:532:10
207 |
208 532 | #[derive(Unaligned)]
209 | ^^^^^^^^^
210 |
211 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
212
213 error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment
214 --> tests/ui-stable/enum.rs:539:10
215 |
216 539 | #[derive(Unaligned)]
217 | ^^^^^^^^^
218 |
219 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
220
221 error: cannot derive `Unaligned` on type with alignment greater than 1
222 --> tests/ui-stable/enum.rs:548:12
223 |
224 548 | #[repr(u8, align(2))]
225 | ^^^^^
226
227 error: cannot derive `Unaligned` on type with alignment greater than 1
228 --> tests/ui-stable/enum.rs:555:12
229 |
230 555 | #[repr(i8, align(2))]
231 | ^^^^^
232
233 error: this conflicts with another representation hint
234 --> tests/ui-stable/enum.rs:562:18
235 |
236 562 | #[repr(align(1), align(2))]
237 | ^^^^^
238
239 error: this conflicts with another representation hint
240 --> tests/ui-stable/enum.rs:569:18
241 |
242 569 | #[repr(align(2), align(4))]
243 | ^^^^^
244
245 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
246 --> tests/ui-stable/enum.rs:606:10
247 |
248 606 | #[derive(IntoBytes)]
249 | ^^^^^^^^^
250 |
251 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
252
253 error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout
254 --> tests/ui-stable/enum.rs:613:10
255 |
256 613 | #[derive(IntoBytes)]
257 | ^^^^^^^^^
258 |
259 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
260
261 error: generic parameters may not be used in const operations
262 --> tests/ui-stable/enum.rs:623:7
263 |
264 623 | A(T),
265 | ^ cannot perform const operation using `T`
266 |
267 = note: type parameters may not be used in const expressions
268
269 error[E0565]: meta item in `repr` must be an identifier
270 --> tests/ui-stable/enum.rs:20:1
271 |
272 20 | #[repr("foo")]
273 | ^^^^^^^^^^^^^^
274
275 error[E0552]: unrecognized representation hint
276 --> tests/ui-stable/enum.rs:27:8
277 |
278 27 | #[repr(foo)]
279 | ^^^
280 |
281 = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
282 = note: for more information, visit <https://doc.rust-lang.org/reference/type-layout.html?highlight=repr#representations>
283
284 error[E0566]: conflicting representation hints
285 --> tests/ui-stable/enum.rs:41:8
286 |
287 41 | #[repr(u8, u16)]
288 | ^^ ^^^
289 |
290 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
291 = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
292 = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default
293
294 error[E0277]: the trait bound `UnsafeCell<()>: Immutable` is not satisfied
295 --> tests/ui-stable/enum.rs:56:10
296 |
297 56 | #[derive(Immutable)]
298 | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell<()>`
299 |
300 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
301 = help: the following other types implement trait `Immutable`:
302 &T
303 &mut T
304 ()
305 (A, B)
306 (A, B, C)
307 (A, B, C, D)
308 (A, B, C, D, E)
309 (A, B, C, D, E, F)
310 and $N others
311 = help: see issue #48214
312 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
313
314 error[E0277]: the trait bound `UnsafeCell<u8>: Immutable` is not satisfied
315 --> tests/ui-stable/enum.rs:66:10
316 |
317 66 | #[derive(Immutable)]
318 | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell<u8>`
319 |
320 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>`
321 = help: the following other types implement trait `Immutable`:
322 &T
323 &mut T
324 ()
325 (A, B)
326 (A, B, C)
327 (A, B, C, D)
328 (A, B, C, D, E)
329 (A, B, C, D, E, F)
330 and $N others
331 = help: see issue #48214
332 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
333
334 error[E0277]: the trait bound `NotTryFromBytes: TryFromBytes` is not satisfied
335 --> tests/ui-stable/enum.rs:92:10
336 |
337 92 | #[derive(TryFromBytes)]
338 | ^^^^^^^^^^^^ unsatisfied trait bound
339 |
340 help: the trait `TryFromBytes` is not implemented for `NotTryFromBytes`
341 --> tests/ui-stable/enum.rs:90:1
342 |
343 90 | struct NotTryFromBytes;
344 | ^^^^^^^^^^^^^^^^^^^^^^
345 = note: Consider adding `#[derive(TryFromBytes)]` to `NotTryFromBytes`
346 = help: the following other types implement trait `TryFromBytes`:
347 ()
348 (A, B)
349 (A, B, C)
350 (A, B, C, D)
351 (A, B, C, D, E)
352 (A, B, C, D, E, F)
353 (A, B, C, D, E, F, G)
354 (A, B, C, D, E, F, G, H)
355 and $N others
356 = help: see issue #48214
357 = note: this error originates in the derive macro `TryFromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
358
359 error[E0277]: the trait bound `NotFromZeros: TryFromBytes` is not satisfied
360 --> tests/ui-stable/enum.rs:143:10
361 |
362 143 | #[derive(FromZeros)]
363 | ^^^^^^^^^ unsatisfied trait bound
364 |
365 help: the trait `TryFromBytes` is not implemented for `NotFromZeros`
366 --> tests/ui-stable/enum.rs:141:1
367 |
368 141 | struct NotFromZeros;
369 | ^^^^^^^^^^^^^^^^^^^
370 = note: Consider adding `#[derive(TryFromBytes)]` to `NotFromZeros`
371 = help: the following other types implement trait `TryFromBytes`:
372 ()
373 (A, B)
374 (A, B, C)
375 (A, B, C, D)
376 (A, B, C, D, E)
377 (A, B, C, D, E, F)
378 (A, B, C, D, E, F, G)
379 (A, B, C, D, E, F, G, H)
380 and $N others
381 = help: see issue #48214
382 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info)
383
384 error[E0277]: the trait bound `NotFromZeros: FromZeros` is not satisfied
385 --> tests/ui-stable/enum.rs:143:10
386 |
387 143 | #[derive(FromZeros)]
388 | ^^^^^^^^^ unsatisfied trait bound
389 |
390 help: the trait `FromZeros` is not implemented for `NotFromZeros`
391 --> tests/ui-stable/enum.rs:141:1
392 |
393 141 | struct NotFromZeros;
394 | ^^^^^^^^^^^^^^^^^^^
395 = note: Consider adding `#[derive(FromZeros)]` to `NotFromZeros`
396 = help: the following other types implement trait `FromZeros`:
397 ()
398 (A, B)
399 (A, B, C)
400 (A, B, C, D)
401 (A, B, C, D, E)
402 (A, B, C, D, E, F)
403 (A, B, C, D, E, F, G)
404 (A, B, C, D, E, F, G, H)
405 and $N others
406 = help: see issue #48214
407 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info)
408
409 error[E0277]: the trait bound `bool: FromBytes` is not satisfied
410 --> tests/ui-stable/enum.rs:217:10
411 |
412 217 | #[derive(FromBytes)]
413 | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool`
414 |
415 = note: Consider adding `#[derive(FromBytes)]` to `bool`
416 = help: the following other types implement trait `FromBytes`:
417 ()
418 (A, B)
419 (A, B, C)
420 (A, B, C, D)
421 (A, B, C, D, E)
422 (A, B, C, D, E, F)
423 (A, B, C, D, E, F, G)
424 (A, B, C, D, E, F, G, H)
425 and $N others
426 = help: see issue #48214
427 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
428
429 error[E0277]: `IntoBytes1` has 1 total byte(s) of padding
430 --> tests/ui-stable/enum.rs:578:10
431 |
432 578 | #[derive(IntoBytes)]
433 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
434 |
435 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
436 = note: consider adding explicit fields where padding would be
437 = note: consider using `#[repr(packed)]` to remove padding
438 help: the trait `PaddingFree<IntoBytes1, 1>` is not implemented for `()`
439 but trait `PaddingFree<IntoBytes1, 0>` is implemented for it
440 --> $WORKSPACE/src/util/macro_util.rs
441 |
442 64 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
443 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
444 = help: see issue #48214
445 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
446
447 error[E0277]: `IntoBytes2` has 3 total byte(s) of padding
448 --> tests/ui-stable/enum.rs:591:10
449 |
450 591 | #[derive(IntoBytes)]
451 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
452 |
453 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
454 = note: consider adding explicit fields where padding would be
455 = note: consider using `#[repr(packed)]` to remove padding
456 help: the trait `PaddingFree<IntoBytes2, 3>` is not implemented for `()`
457 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
458 --> $WORKSPACE/src/util/macro_util.rs
459 |
460 64 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
461 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
462 = help: see issue #48214
463 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
464
465 error[E0277]: `IntoBytes3` has 2 total byte(s) of padding
466 --> tests/ui-stable/enum.rs:598:10
467 |
468 598 | #[derive(IntoBytes)]
469 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
470 |
471 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
472 = note: consider adding explicit fields where padding would be
473 = note: consider using `#[repr(packed)]` to remove padding
474 help: the trait `PaddingFree<IntoBytes3, 2>` is not implemented for `()`
475 but trait `PaddingFree<IntoBytes3, 0>` is implemented for it
476 --> $WORKSPACE/src/util/macro_util.rs
477 |
478 64 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
479 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
480 = help: see issue #48214
481 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
482
483 error: generic `Self` types are currently not permitted in anonymous constants
484 --> tests/ui-stable/enum.rs:619:10
485 |
486 619 | #[derive(IntoBytes)]
487 | ^^^^^^^^^
488 |
489 note: not a concrete type
490 --> tests/ui-stable/enum.rs:619:10
491 |
492 619 | #[derive(IntoBytes)]
493 | ^^^^^^^^^
494 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
495
496 error[E0277]: the trait bound `bool: FromBytes` is not satisfied
497 --> tests/ui-stable/enum.rs:217:10
498 |
499 217 | #[derive(FromBytes)]
500 | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool`
501 |
502 = note: Consider adding `#[derive(FromBytes)]` to `bool`
503 = help: the following other types implement trait `FromBytes`:
504 ()
505 (A, B)
506 (A, B, C)
507 (A, B, C, D)
508 (A, B, C, D, E)
509 (A, B, C, D, E, F)
510 (A, B, C, D, E, F, G)
511 (A, B, C, D, E, F, G, H)
512 and $N others
513 note: required for `FooU8` to implement `FromBytes`
514 --> tests/ui-stable/enum.rs:217:10
515 |
516 217 | #[derive(FromBytes)]
517 | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
518 note: required by a bound in `assert_is_from_bytes`
519 --> tests/ui-stable/enum.rs:217:10
520 |
521 217 | #[derive(FromBytes)]
522 | ^^^^^^^^^ required by this bound in `assert_is_from_bytes`
523 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)