Debian Codegraph @

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

raw
1 error: this conflicts with another representation hint
2 --> tests/ui-nightly/struct.rs:167:8
3 |
4 167 | #[repr(C, C)] // zerocopy-derive conservatively treats these as conflicting reprs
5 | ^^^^
6
7 error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
8 --> tests/ui-nightly/struct.rs:172:10
9 |
10 172 | #[derive(IntoBytes)]
11 | ^^^^^^^^^
12 |
13 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
14
15 error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
16 --> tests/ui-nightly/struct.rs:177:10
17 |
18 177 | #[derive(IntoBytes)]
19 | ^^^^^^^^^
20 |
21 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
22
23 error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
24 --> tests/ui-nightly/struct.rs:200:10
25 |
26 200 | #[derive(IntoBytes)]
27 | ^^^^^^^^^
28 |
29 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
30
31 error: cannot derive `Unaligned` on type with alignment greater than 1
32 --> tests/ui-nightly/struct.rs:211:11
33 |
34 211 | #[repr(C, align(2))]
35 | ^^^^^^^^
36
37 error: this conflicts with another representation hint
38 --> tests/ui-nightly/struct.rs:215:8
39 |
40 215 | #[repr(transparent, align(2))]
41 | ^^^^^^^^^^^
42
43 error: this conflicts with another representation hint
44 --> tests/ui-nightly/struct.rs:221:8
45 |
46 221 | #[repr(packed, align(2))]
47 | ^^^^^^^^^^^^^^^^
48
49 error: this conflicts with another representation hint
50 --> tests/ui-nightly/struct.rs:225:8
51 |
52 225 | #[repr(align(1), align(2))]
53 | ^^^^^^^^^^^^^^^^^^
54
55 error: this conflicts with another representation hint
56 --> tests/ui-nightly/struct.rs:229:8
57 |
58 229 | #[repr(align(2), align(4))]
59 | ^^^^^^^^^^^^^^^^^^
60
61 error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
62 --> tests/ui-nightly/struct.rs:232:10
63 |
64 232 | #[derive(Unaligned)]
65 | ^^^^^^^^^
66 |
67 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
68
69 error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
70 --> tests/ui-nightly/struct.rs:235:10
71 |
72 235 | #[derive(Unaligned)]
73 | ^^^^^^^^^
74 |
75 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
76
77 error: this conflicts with another representation hint
78 --> tests/ui-nightly/struct.rs:243:19
79 |
80 243 | #[repr(packed(2), C)]
81 | ___________________^
82 244 | | #[derive(Unaligned)]
83 245 | | #[repr(C, packed(2))]
84 | |________^
85
86 error[E0692]: transparent struct cannot have other repr hints
87 --> tests/ui-nightly/struct.rs:215:8
88 |
89 215 | #[repr(transparent, align(2))]
90 | ^^^^^^^^^^^ ^^^^^^^^
91
92 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
93 --> tests/ui-nightly/struct.rs:31:10
94 |
95 31 | #[derive(KnownLayout)]
96 | ^^^^^^^^^^^ doesn't have a size known at compile-time
97 |
98 = help: within `KL00`, the trait `Sized` is not implemented for `[u8]`
99 note: required because it appears within the type `KL00`
100 --> tests/ui-nightly/struct.rs:32:8
101 |
102 32 | struct KL00(u8, NotKnownLayoutDst);
103 | ^^^^
104 = help: see issue #48214
105 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)
106 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
107 |
108 9 + #![feature(trivial_bounds)]
109 |
110
111 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
112 --> tests/ui-nightly/struct.rs:36:10
113 |
114 36 | #[derive(KnownLayout)]
115 | ^^^^^^^^^^^ doesn't have a size known at compile-time
116 |
117 = help: within `KL02`, the trait `Sized` is not implemented for `[u8]`
118 note: required because it appears within the type `KL02`
119 --> tests/ui-nightly/struct.rs:37:8
120 |
121 37 | struct KL02(u8, [u8]);
122 | ^^^^
123 = help: see issue #48214
124 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)
125 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
126 |
127 9 + #![feature(trivial_bounds)]
128 |
129
130 error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy::KnownLayout` is not satisfied
131 --> tests/ui-nightly/struct.rs:41:10
132 |
133 41 | #[derive(KnownLayout)]
134 | ^^^^^^^^^^^ unsatisfied trait bound
135 |
136 help: the trait `zerocopy::KnownLayout` is not implemented for `NotKnownLayoutDst`
137 --> tests/ui-nightly/struct.rs:27:1
138 |
139 27 | struct NotKnownLayoutDst([u8]);
140 | ^^^^^^^^^^^^^^^^^^^^^^^^
141 = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayoutDst`
142 = help: the following other types implement trait `zerocopy::KnownLayout`:
143 &T
144 &mut T
145 ()
146 *const T
147 *mut T
148 AU16
149 AtomicBool
150 AtomicI16
151 and $N others
152 = help: see issue #48214
153 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)
154 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
155 |
156 9 + #![feature(trivial_bounds)]
157 |
158
159 error[E0277]: the trait bound `NotKnownLayout: zerocopy::KnownLayout` is not satisfied
160 --> tests/ui-nightly/struct.rs:47:10
161 |
162 47 | #[derive(KnownLayout)]
163 | ^^^^^^^^^^^ unsatisfied trait bound
164 |
165 help: the trait `zerocopy::KnownLayout` is not implemented for `NotKnownLayout`
166 --> tests/ui-nightly/struct.rs:25:1
167 |
168 25 | struct NotKnownLayout;
169 | ^^^^^^^^^^^^^^^^^^^^^
170 = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayout`
171 = help: the following other types implement trait `zerocopy::KnownLayout`:
172 &T
173 &mut T
174 ()
175 *const T
176 *mut T
177 AU16
178 AtomicBool
179 AtomicI16
180 and $N others
181 = help: see issue #48214
182 = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)
183 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
184 |
185 9 + #![feature(trivial_bounds)]
186 |
187
188 error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied
189 --> tests/ui-nightly/struct.rs:55:10
190 |
191 55 | #[derive(Immutable)]
192 | ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>`
193 |
194 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
195 = help: the following other types implement trait `zerocopy::Immutable`:
196 &T
197 &mut T
198 ()
199 *const T
200 *mut T
201 AU16
202 F32<O>
203 F64<O>
204 and $N others
205 = help: see issue #48214
206 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
207 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
208 |
209 9 + #![feature(trivial_bounds)]
210 |
211
212 error[E0277]: the trait bound `UnsafeCell<u8>: zerocopy::Immutable` is not satisfied
213 --> tests/ui-nightly/struct.rs:60:10
214 |
215 60 | #[derive(Immutable)]
216 | ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<u8>`
217 |
218 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>`
219 = help: the following other types implement trait `zerocopy::Immutable`:
220 &T
221 &mut T
222 ()
223 *const T
224 *mut T
225 AU16
226 F32<O>
227 F64<O>
228 and $N others
229 = note: required for `[UnsafeCell<u8>; 0]` to implement `zerocopy::Immutable`
230 = help: see issue #48214
231 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
232 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
233 |
234 9 + #![feature(trivial_bounds)]
235 |
236
237 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
238 --> tests/ui-nightly/struct.rs:71:1
239 |
240 71 | struct TryFromBytesPacked {
241 | ^^^^^^^^^^^^^^^^^^^^^^^^^
242 |
243 note: `AU16` has a `#[repr(align)]` attribute
244 --> tests/ui-nightly/../include.rs
245 |
246 | pub struct AU16(pub u16);
247 | ^^^^^^^^^^^^^^^
248
249 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
250 --> tests/ui-nightly/struct.rs:77:1
251 |
252 77 | struct TryFromBytesPackedN {
253 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
254 |
255 note: `AU16` has a `#[repr(align)]` attribute
256 --> tests/ui-nightly/../include.rs
257 |
258 | pub struct AU16(pub u16);
259 | ^^^^^^^^^^^^^^^
260
261 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
262 --> tests/ui-nightly/struct.rs:83:1
263 |
264 83 | struct TryFromBytesCPacked {
265 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
266 |
267 note: `AU16` has a `#[repr(align)]` attribute
268 --> tests/ui-nightly/../include.rs
269 |
270 | pub struct AU16(pub u16);
271 | ^^^^^^^^^^^^^^^
272
273 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
274 --> tests/ui-nightly/struct.rs:89:1
275 |
276 89 | struct TryFromBytesCPackedN {
277 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 |
279 note: `AU16` has a `#[repr(align)]` attribute
280 --> tests/ui-nightly/../include.rs
281 |
282 | pub struct AU16(pub u16);
283 | ^^^^^^^^^^^^^^^
284
285 error[E0277]: the trait bound `AU16: zerocopy::Unaligned` is not satisfied
286 --> tests/ui-nightly/struct.rs:100:10
287 |
288 100 | #[derive(IntoBytes)]
289 | ^^^^^^^^^ unsatisfied trait bound
290 |
291 help: the trait `zerocopy::Unaligned` is not implemented for `AU16`
292 --> tests/ui-nightly/../include.rs
293 |
294 63 | pub struct AU16(pub u16);
295 | ^^^^^^^^^^^^^^^
296 = note: Consider adding `#[derive(Unaligned)]` to `AU16`
297 = help: the following other types implement trait `zerocopy::Unaligned`:
298 ()
299 AtomicBool
300 AtomicI8
301 AtomicU8
302 Cell<T>
303 F32<O>
304 F64<O>
305 I128<O>
306 and $N others
307 = help: see issue #48214
308 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
309 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
310 |
311 9 + #![feature(trivial_bounds)]
312 |
313
314 error[E0277]: `IntoBytes2` has 1 total byte(s) of padding
315 --> tests/ui-nightly/struct.rs:107:10
316 |
317 107 | #[derive(IntoBytes)]
318 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
319 |
320 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
321 = note: consider adding explicit fields where padding would be
322 = note: consider using `#[repr(packed)]` to remove padding
323 = help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()`
324 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
325 = help: see issue #48214
326 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
327 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
328 |
329 9 + #![feature(trivial_bounds)]
330 |
331
332 error[E0277]: `IntoBytes3` has 1 total byte(s) of padding
333 --> tests/ui-nightly/struct.rs:114:10
334 |
335 114 | #[derive(IntoBytes)]
336 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
337 |
338 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
339 = note: consider adding explicit fields where padding would be
340 = note: consider using `#[repr(packed)]` to remove padding
341 = help: the trait `PaddingFree<IntoBytes3, 1>` is not implemented for `()`
342 but trait `PaddingFree<IntoBytes3, 0>` is implemented for it
343 = help: see issue #48214
344 = note: this error originates in the derive macro `IntoBytes` (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 size for values of type `[u8]` cannot be known at compilation time
351 --> tests/ui-nightly/struct.rs:130:10
352 |
353 130 | #[derive(IntoBytes)]
354 | ^^^^^^^^^ doesn't have a size known at compile-time
355 |
356 = help: within `IntoBytes4`, the trait `Sized` is not implemented for `[u8]`
357 note: required because it appears within the type `IntoBytes4`
358 --> tests/ui-nightly/struct.rs:132:8
359 |
360 132 | struct IntoBytes4 {
361 | ^^^^^^^^^^
362 = note: required for `IntoBytes4` to implement `macro_util::__size_of::Sized`
363 note: required by a bound in `macro_util::__size_of::size_of`
364 --> $WORKSPACE/src/util/macro_util.rs
365 |
366 | pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize {
367 | ^^^^^ required by this bound in `size_of`
368 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
369
370 error[E0277]: `[u8]` is unsized
371 --> tests/ui-nightly/struct.rs:134:8
372 |
373 134 | b: SliceU8,
374 | ^^^^^^^ `IntoBytes` needs all field types to be `Sized` in order to determine whether there is padding
375 |
376 = help: the trait `Sized` is not implemented for `[u8]`
377 = note: consider using `#[repr(packed)]` to remove padding
378 = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized`
379 = note: required for `[u8]` to implement `macro_util::__size_of::Sized`
380 note: required by a bound in `macro_util::__size_of::size_of`
381 --> $WORKSPACE/src/util/macro_util.rs
382 |
383 | pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize {
384 | ^^^^^ required by this bound in `size_of`
385
386 error[E0277]: `IntoBytes5` has one or more padding bytes
387 --> tests/ui-nightly/struct.rs:139:10
388 |
389 139 | #[derive(IntoBytes)]
390 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
391 |
392 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
393 = note: consider adding explicit fields where padding would be
394 = note: consider using `#[repr(packed)]` to remove padding
395 = help: the trait `DynamicPaddingFree<IntoBytes5, true>` is not implemented for `()`
396 but trait `DynamicPaddingFree<IntoBytes5, false>` is implemented for it
397 = help: see issue #48214
398 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
399 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
400 |
401 9 + #![feature(trivial_bounds)]
402 |
403
404 error[E0277]: `IntoBytes6` has one or more padding bytes
405 --> tests/ui-nightly/struct.rs:148:10
406 |
407 148 | #[derive(IntoBytes)]
408 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
409 |
410 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
411 = note: consider adding explicit fields where padding would be
412 = note: consider using `#[repr(packed)]` to remove padding
413 = help: the trait `DynamicPaddingFree<IntoBytes6, true>` is not implemented for `()`
414 but trait `DynamicPaddingFree<IntoBytes6, false>` is implemented for it
415 = help: see issue #48214
416 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
417 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
418 |
419 9 + #![feature(trivial_bounds)]
420 |
421
422 error[E0277]: `IntoBytes7` has one or more padding bytes
423 --> tests/ui-nightly/struct.rs:158:10
424 |
425 158 | #[derive(IntoBytes)]
426 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
427 |
428 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
429 = note: consider adding explicit fields where padding would be
430 = note: consider using `#[repr(packed)]` to remove padding
431 = help: the trait `DynamicPaddingFree<IntoBytes7, true>` is not implemented for `()`
432 but trait `DynamicPaddingFree<IntoBytes7, false>` is implemented for it
433 = help: see issue #48214
434 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
435 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
436 |
437 9 + #![feature(trivial_bounds)]
438 |
439
440 error[E0587]: type has conflicting packed and align representation hints
441 --> tests/ui-nightly/struct.rs:222:1
442 |
443 222 | struct Unaligned3;
444 | ^^^^^^^^^^^^^^^^^
445
446 error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy::KnownLayout` is not satisfied
447 --> tests/ui-nightly/struct.rs:248:10
448 |
449 248 | #[derive(SplitAt)]
450 | ^^^^^^^ unsatisfied trait bound
451 |
452 help: the trait `zerocopy::KnownLayout` is not implemented for `SplitAtNotKnownLayout`
453 --> tests/ui-nightly/struct.rs:250:1
454 |
455 250 | struct SplitAtNotKnownLayout([u8]);
456 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
457 = note: Consider adding `#[derive(KnownLayout)]` to `SplitAtNotKnownLayout`
458 = help: the following other types implement trait `zerocopy::KnownLayout`:
459 &T
460 &mut T
461 ()
462 *const T
463 *mut T
464 AU16
465 AtomicBool
466 AtomicI16
467 and $N others
468 note: required by a bound in `SplitAt`
469 --> $WORKSPACE/src/split_at.rs
470 |
471 61 | pub unsafe trait SplitAt: KnownLayout<PointerMetadata = usize> {
472 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `SplitAt`
473 = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info)
474
475 error[E0277]: the trait bound `u8: SplitAt` is not satisfied
476 --> tests/ui-nightly/struct.rs:252:10
477 |
478 252 | #[derive(SplitAt, KnownLayout)]
479 | ^^^^^^^ the trait `SplitAt` is not implemented for `u8`
480 |
481 = note: Consider adding `#[derive(SplitAt)]` to `u8`
482 = help: the following other types implement trait `SplitAt`:
483 SplitAtNotKnownLayout
484 SplitAtSized
485 [T]
486 = help: see issue #48214
487 = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info)
488 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
489 |
490 9 + #![feature(trivial_bounds)]
491 |
492
493 error[E0277]: the trait bound `AU16: zerocopy::Unaligned` is not satisfied
494 --> tests/ui-nightly/struct.rs:195:28
495 |
496 195 | is_into_bytes_11::<IntoBytes11<AU16>>();
497 | ^^^^^^^^^^^^^^^^^ unsatisfied trait bound
498 |
499 help: the trait `zerocopy::Unaligned` is not implemented for `AU16`
500 --> tests/ui-nightly/../include.rs
501 |
502 63 | pub struct AU16(pub u16);
503 | ^^^^^^^^^^^^^^^
504 = note: Consider adding `#[derive(Unaligned)]` to `AU16`
505 = help: the following other types implement trait `zerocopy::Unaligned`:
506 ()
507 AtomicBool
508 AtomicI8
509 AtomicU8
510 Cell<T>
511 F32<O>
512 F64<O>
513 I128<O>
514 and $N others
515 note: required for `IntoBytes11<AU16>` to implement `zerocopy::IntoBytes`
516 --> tests/ui-nightly/struct.rs:184:10
517 |
518 184 | #[derive(IntoBytes)]
519 | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
520 note: required by a bound in `is_into_bytes_11`
521 --> tests/ui-nightly/struct.rs:193:24
522 |
523 193 | fn is_into_bytes_11<T: IntoBytes>() {
524 | ^^^^^^^^^ required by this bound in `is_into_bytes_11`
525 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)