Debian Codegraph @

.cargo/vendor/zerocopy-derive/tests/ui-nightly/enum.stderr

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