Debian Codegraph @

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

raw
1 error: unrecognized representation hint
2 --> tests/ui-stable/enum.rs:19:8
3 |
4 19 | #[repr("foo")]
5 | ^^^^^
6
7 error: unrecognized representation hint
8 --> tests/ui-stable/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-stable/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-stable/enum.rs:37:12
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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/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-stable/enum.rs:517:12
236 |
237 517 | #[repr(i8, align(2))]
238 | ^^^^^
239
240 error: this conflicts with another representation hint
241 --> tests/ui-stable/enum.rs:523:18
242 |
243 523 | #[repr(align(1), align(2))]
244 | ^^^^^
245
246 error: this conflicts with another representation hint
247 --> tests/ui-stable/enum.rs:529:18
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-stable/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-stable/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-stable/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
276 error[E0565]: meta item in `repr` must be an identifier
277 --> tests/ui-stable/enum.rs:19:1
278 |
279 19 | #[repr("foo")]
280 | ^^^^^^^^^^^^^^
281
282 error[E0552]: unrecognized representation hint
283 --> tests/ui-stable/enum.rs:25:8
284 |
285 25 | #[repr(foo)]
286 | ^^^
287 |
288 = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
289
290 error[E0566]: conflicting representation hints
291 --> tests/ui-stable/enum.rs:37:8
292 |
293 37 | #[repr(u8, u16)]
294 | ^^ ^^^
295 |
296 = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
297 = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
298 = note: `#[deny(conflicting_repr_hints)]` on by default
299
300 error[E0277]: the trait bound `UnsafeCell<()>: Immutable` is not satisfied
301 --> tests/ui-stable/enum.rs:51:10
302 |
303 51 | #[derive(Immutable)]
304 | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell<()>`
305 |
306 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
307 = help: the following other types implement trait `Immutable`:
308 &T
309 &mut T
310 ()
311 *const T
312 *mut T
313 F32<O>
314 F64<O>
315 I128<O>
316 and $N others
317 = help: see issue #48214
318 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
319
320 error[E0277]: the trait bound `UnsafeCell<u8>: Immutable` is not satisfied
321 --> tests/ui-stable/enum.rs:59:10
322 |
323 59 | #[derive(Immutable)]
324 | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell<u8>`
325 |
326 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>`
327 = help: the following other types implement trait `Immutable`:
328 &T
329 &mut T
330 ()
331 *const T
332 *mut T
333 F32<O>
334 F64<O>
335 I128<O>
336 and $N others
337 = help: see issue #48214
338 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
339
340 error[E0277]: the trait bound `NotTryFromBytes: TryFromBytes` is not satisfied
341 --> tests/ui-stable/enum.rs:82:10
342 |
343 82 | #[derive(TryFromBytes)]
344 | ^^^^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotTryFromBytes`
345 |
346 = note: Consider adding `#[derive(TryFromBytes)]` to `NotTryFromBytes`
347 = help: the following other types implement trait `TryFromBytes`:
348 ()
349 *const T
350 *mut T
351 <FromZeros6 as TryFromBytes>::is_bit_valid::___ZerocopyVariantStruct_A
352 <TryFromBytes3 as TryFromBytes>::is_bit_valid::___ZerocopyVariantStruct_A
353 AtomicBool
354 AtomicI16
355 AtomicI32
356 and $N others
357 = help: see issue #48214
358 = note: this error originates in the derive macro `TryFromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
359
360 error[E0277]: the trait bound `NotFromZeros: TryFromBytes` is not satisfied
361 --> tests/ui-stable/enum.rs:127:10
362 |
363 127 | #[derive(FromZeros)]
364 | ^^^^^^^^^ the trait `TryFromBytes` is not implemented for `NotFromZeros`
365 |
366 = note: Consider adding `#[derive(TryFromBytes)]` to `NotFromZeros`
367 = help: the following other types implement trait `TryFromBytes`:
368 ()
369 *const T
370 *mut T
371 <FromZeros6 as TryFromBytes>::is_bit_valid::___ZerocopyVariantStruct_A
372 <TryFromBytes3 as TryFromBytes>::is_bit_valid::___ZerocopyVariantStruct_A
373 AtomicBool
374 AtomicI16
375 AtomicI32
376 and $N others
377 = help: see issue #48214
378 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info)
379
380 error[E0277]: the trait bound `NotFromZeros: FromZeros` is not satisfied
381 --> tests/ui-stable/enum.rs:127:10
382 |
383 127 | #[derive(FromZeros)]
384 | ^^^^^^^^^ the trait `FromZeros` is not implemented for `NotFromZeros`
385 |
386 = note: Consider adding `#[derive(FromZeros)]` to `NotFromZeros`
387 = help: the following other types implement trait `FromZeros`:
388 ()
389 *const T
390 *mut T
391 AtomicBool
392 AtomicI16
393 AtomicI32
394 AtomicI64
395 AtomicI8
396 and $N others
397 = help: see issue #48214
398 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info)
399
400 error[E0277]: the trait bound `bool: FromBytes` is not satisfied
401 --> tests/ui-stable/enum.rs:191:10
402 |
403 191 | #[derive(FromBytes)]
404 | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool`
405 |
406 = note: Consider adding `#[derive(FromBytes)]` to `bool`
407 = help: the following other types implement trait `FromBytes`:
408 ()
409 AtomicI16
410 AtomicI32
411 AtomicI64
412 AtomicI8
413 AtomicIsize
414 AtomicU16
415 AtomicU32
416 and $N others
417 = help: see issue #48214
418 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
419
420 error[E0277]: `IntoBytes1` has 1 total byte(s) of padding
421 --> tests/ui-stable/enum.rs:538:10
422 |
423 538 | #[derive(IntoBytes)]
424 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
425 |
426 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
427 = note: consider adding explicit fields where padding would be
428 = note: consider using `#[repr(packed)]` to remove padding
429 = help: the trait `PaddingFree<IntoBytes1, 1>` is not implemented for `()`
430 but trait `PaddingFree<IntoBytes1, 0>` is implemented for it
431 = help: see issue #48214
432 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
433
434 error[E0277]: `IntoBytes2` has 3 total byte(s) of padding
435 --> tests/ui-stable/enum.rs:549:10
436 |
437 549 | #[derive(IntoBytes)]
438 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
439 |
440 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
441 = note: consider adding explicit fields where padding would be
442 = note: consider using `#[repr(packed)]` to remove padding
443 = help: the trait `PaddingFree<IntoBytes2, 3>` is not implemented for `()`
444 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
445 = help: see issue #48214
446 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
447
448 error[E0277]: `IntoBytes3` has 2 total byte(s) of padding
449 --> tests/ui-stable/enum.rs:555:10
450 |
451 555 | #[derive(IntoBytes)]
452 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
453 |
454 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
455 = note: consider adding explicit fields where padding would be
456 = note: consider using `#[repr(packed)]` to remove padding
457 = help: the trait `PaddingFree<IntoBytes3, 2>` is not implemented for `()`
458 but trait `PaddingFree<IntoBytes3, 0>` is implemented for it
459 = help: see issue #48214
460 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
461
462 error: generic `Self` types are currently not permitted in anonymous constants
463 --> tests/ui-stable/enum.rs:573:10
464 |
465 573 | #[derive(IntoBytes)]
466 | ^^^^^^^^^
467 |
468 note: not a concrete type
469 --> tests/ui-stable/enum.rs:573:10
470 |
471 573 | #[derive(IntoBytes)]
472 | ^^^^^^^^^
473 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
474
475 error[E0277]: the trait bound `bool: FromBytes` is not satisfied
476 --> tests/ui-stable/enum.rs:191:10
477 |
478 191 | #[derive(FromBytes)]
479 | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool`
480 |
481 = note: Consider adding `#[derive(FromBytes)]` to `bool`
482 = help: the following other types implement trait `FromBytes`:
483 ()
484 AtomicI16
485 AtomicI32
486 AtomicI64
487 AtomicI8
488 AtomicIsize
489 AtomicU16
490 AtomicU32
491 and $N others
492 note: required for `FooU8` to implement `FromBytes`
493 --> tests/ui-stable/enum.rs:191:10
494 |
495 191 | #[derive(FromBytes)]
496 | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
497 note: required by a bound in `assert_is_from_bytes`
498 --> tests/ui-stable/enum.rs:191:10
499 |
500 191 | #[derive(FromBytes)]
501 | ^^^^^^^^^ required by this bound in `assert_is_from_bytes`
502 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)