zerocopy-derive 0.8.50

Custom derive for traits from the zerocopy crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
error: this conflicts with another representation hint
   --> $DIR/struct.rs:210:11
    |
210 | #[repr(C, C)] // zerocopy-derive conservatively treats these as conflicting reprs
    |           ^

error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
   --> $DIR/struct.rs:216:10
    |
216 | #[derive(IntoBytes)]
    |          ^^^^^^^^^
    |
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
   --> $DIR/struct.rs:223:10
    |
223 | #[derive(IntoBytes)]
    |          ^^^^^^^^^
    |
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
   --> $DIR/struct.rs:250:10
    |
250 | #[derive(IntoBytes)]
    |          ^^^^^^^^^
    |
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: cannot derive `Unaligned` on type with alignment greater than 1
   --> $DIR/struct.rs:273:11
    |
273 | #[repr(C, align(2))]
    |           ^^^^^

error: this conflicts with another representation hint
   --> $DIR/struct.rs:279:8
    |
279 | #[repr(transparent, align(2))]
    |        ^^^^^^^^^^^

error: this conflicts with another representation hint
   --> $DIR/struct.rs:288:16
    |
288 | #[repr(packed, align(2))]
    |                ^^^^^

error: this conflicts with another representation hint
   --> $DIR/struct.rs:295:18
    |
295 | #[repr(align(1), align(2))]
    |                  ^^^^^

error: this conflicts with another representation hint
   --> $DIR/struct.rs:301:18
    |
301 | #[repr(align(2), align(4))]
    |                  ^^^^^

error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
   --> $DIR/struct.rs:305:10
    |
305 | #[derive(Unaligned)]
    |          ^^^^^^^^^
    |
    = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)

error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
   --> $DIR/struct.rs:310:10
    |
310 | #[derive(Unaligned)]
    |          ^^^^^^^^^
    |
    = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)

error: this conflicts with another representation hint
   --> $DIR/struct.rs:324:8
    |
324 | #[repr(C, packed(2))]
    |        ^

error[E0692]: transparent struct cannot have other repr hints
   --> $DIR/struct.rs:279:8
    |
279 | #[repr(transparent, align(2))]
    |        ^^^^^^^^^^^  ^^^^^^^^

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> $DIR/struct.rs:31:10
   |
31 | #[derive(KnownLayout)]
   |          ^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `KL00`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `KL00`
  --> $DIR/struct.rs:34:8
   |
34 | struct KL00(u8, NotKnownLayoutDst);
   |        ^^^^
   = help: see issue #48214
   = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> $DIR/struct.rs:38:10
   |
38 | #[derive(KnownLayout)]
   |          ^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: within `KL02`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `KL02`
  --> $DIR/struct.rs:41:8
   |
41 | struct KL02(u8, [u8]);
   |        ^^^^
   = help: see issue #48214
   = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy_renamed::KnownLayout` is not satisfied
  --> $DIR/struct.rs:45:10
   |
45 | #[derive(KnownLayout)]
   |          ^^^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `NotKnownLayoutDst`
  --> $DIR/struct.rs:27:1
   |
27 | struct NotKnownLayoutDst([u8]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^
   = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayoutDst`
   = help: the following other types implement trait `zerocopy_renamed::KnownLayout`:
             &T
             &mut T
             ()
             *const T
             *mut T
             AU16
             AtomicBool
             AtomicI16
           and 73 others
   = help: see issue #48214
   = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `NotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied
  --> $DIR/struct.rs:53:10
   |
53 | #[derive(KnownLayout)]
   |          ^^^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `NotKnownLayout`
  --> $DIR/struct.rs:25:1
   |
25 | struct NotKnownLayout;
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: Consider adding `#[derive(KnownLayout)]` to `NotKnownLayout`
   = help: the following other types implement trait `zerocopy_renamed::KnownLayout`:
             &T
             &mut T
             ()
             *const T
             *mut T
             AU16
             AtomicBool
             AtomicI16
           and 73 others
   = help: see issue #48214
   = note: this error originates in the derive macro `KnownLayout` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `UnsafeCell<()>: zerocopy_renamed::Immutable` is not satisfied
  --> $DIR/struct.rs:63:10
   |
63 | #[derive(Immutable)]
   |          ^^^^^^^^^ the trait `zerocopy_renamed::Immutable` is not implemented for `UnsafeCell<()>`
   |
   = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
   = help: the following other types implement trait `zerocopy_renamed::Immutable`:
             &T
             &mut T
             ()
             (A, B)
             (A, B, C)
             (A, B, C, D)
             (A, B, C, D, E)
             (A, B, C, D, E, F)
           and 130 others
   = help: see issue #48214
   = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `UnsafeCell<u8>: zerocopy_renamed::Immutable` is not satisfied
  --> $DIR/struct.rs:70:10
   |
70 | #[derive(Immutable)]
   |          ^^^^^^^^^ the trait `zerocopy_renamed::Immutable` is not implemented for `UnsafeCell<u8>`
   |
   = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>`
   = help: the following other types implement trait `zerocopy_renamed::Immutable`:
             &T
             &mut T
             ()
             (A, B)
             (A, B, C)
             (A, B, C, D)
             (A, B, C, D, E)
             (A, B, C, D, E, F)
           and 130 others
   = note: required for `[UnsafeCell<u8>; 0]` to implement `zerocopy_renamed::Immutable`
   = help: see issue #48214
   = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
  --> $DIR/struct.rs:84:1
   |
84 | struct TryFromBytesPacked {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: `AU16` has a `#[repr(align)]` attribute
  --> $DIR/../include.rs:64:5
   |
64 |     pub struct AU16(pub u16);
   |     ^^^^^^^^^^^^^^^

error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
  --> $DIR/struct.rs:92:1
   |
92 | struct TryFromBytesPackedN {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
note: `AU16` has a `#[repr(align)]` attribute
  --> $DIR/../include.rs:64:5
   |
64 |     pub struct AU16(pub u16);
   |     ^^^^^^^^^^^^^^^

error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/struct.rs:100:1
    |
100 | struct TryFromBytesCPacked {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: `AU16` has a `#[repr(align)]` attribute
   --> $DIR/../include.rs:64:5
    |
 64 |     pub struct AU16(pub u16);
    |     ^^^^^^^^^^^^^^^

error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
   --> $DIR/struct.rs:108:1
    |
108 | struct TryFromBytesCPackedN {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: `AU16` has a `#[repr(align)]` attribute
   --> $DIR/../include.rs:64:5
    |
 64 |     pub struct AU16(pub u16);
    |     ^^^^^^^^^^^^^^^

error[E0277]: the trait bound `AU16: zerocopy_renamed::Unaligned` is not satisfied
   --> $DIR/struct.rs:120:10
    |
120 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ unsatisfied trait bound
    |
help: the trait `zerocopy_renamed::Unaligned` is not implemented for `AU16`
   --> $DIR/../include.rs:64:5
    |
 64 |     pub struct AU16(pub u16);
    |     ^^^^^^^^^^^^^^^
    = note: Consider adding `#[derive(Unaligned)]` to `AU16`
    = help: the following other types implement trait `zerocopy_renamed::Unaligned`:
              ()
              AtomicBool
              AtomicI8
              AtomicU8
              Cell<T>
              F32<O>
              F64<O>
              I128<O>
            and 26 others
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `IntoBytes2` has 1 total byte(s) of padding
   --> $DIR/struct.rs:129:10
    |
129 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()`
      but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:62:1
    |
 62 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `IntoBytes3` has 1 total byte(s) of padding
   --> $DIR/struct.rs:139:10
    |
139 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `PaddingFree<IntoBytes3, 1>` is not implemented for `()`
      but trait `PaddingFree<IntoBytes3, 0>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:62:1
    |
 62 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
   --> $DIR/struct.rs:158:10
    |
158 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: within `IntoBytes4`, the trait `Sized` is not implemented for `[u8]`
note: required because it appears within the type `IntoBytes4`
   --> $DIR/struct.rs:163:8
    |
163 | struct IntoBytes4 {
    |        ^^^^^^^^^^
    = note: required for `IntoBytes4` to implement `macro_util::__size_of::Sized`
note: required by a bound in `macro_util::__size_of::size_of`
   --> $WORKSPACE/src/util/macro_util.rs:306:29
    |
306 |     pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize {
    |                             ^^^^^ required by this bound in `size_of`
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `[u8]` is unsized
   --> $DIR/struct.rs:165:8
    |
165 |     b: SliceU8,
    |        ^^^^^^^ `IntoBytes` needs all field types to be `Sized` in order to determine whether there is padding
    |
    = help: the trait `Sized` is not implemented for `[u8]`
    = note: consider using `#[repr(packed)]` to remove padding
    = note: `IntoBytes` does not require the fields of `#[repr(packed)]` types to be `Sized`
    = note: required for `[u8]` to implement `macro_util::__size_of::Sized`
note: required by a bound in `macro_util::__size_of::size_of`
   --> $WORKSPACE/src/util/macro_util.rs:306:29
    |
306 |     pub const fn size_of<T: Sized + ?core::marker::Sized>() -> usize {
    |                             ^^^^^ required by this bound in `size_of`

error[E0277]: `IntoBytes5` has one or more padding bytes
   --> $DIR/struct.rs:172:10
    |
172 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `DynamicPaddingFree<IntoBytes5, true>` is not implemented for `()`
      but trait `DynamicPaddingFree<IntoBytes5, false>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:80:1
    |
 80 | impl<T: ?Sized> DynamicPaddingFree<T, false> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `IntoBytes6` has one or more padding bytes
   --> $DIR/struct.rs:184:10
    |
184 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `DynamicPaddingFree<IntoBytes6, true>` is not implemented for `()`
      but trait `DynamicPaddingFree<IntoBytes6, false>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:80:1
    |
 80 | impl<T: ?Sized> DynamicPaddingFree<T, false> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `IntoBytes7` has one or more padding bytes
   --> $DIR/struct.rs:197:10
    |
197 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `DynamicPaddingFree<IntoBytes7, true>` is not implemented for `()`
      but trait `DynamicPaddingFree<IntoBytes7, false>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:80:1
    |
 80 | impl<T: ?Sized> DynamicPaddingFree<T, false> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `IntoBytes13` has one or more padding bytes
   --> $DIR/struct.rs:260:10
    |
260 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
    |
    = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
    = note: consider adding explicit fields where padding would be
    = note: consider using `#[repr(packed)]` to remove padding
help: the trait `DynamicPaddingFree<IntoBytes13, true>` is not implemented for `()`
      but trait `DynamicPaddingFree<IntoBytes13, false>` is implemented for it
   --> $WORKSPACE/src/util/macro_util.rs:80:1
    |
 80 | impl<T: ?Sized> DynamicPaddingFree<T, false> for () {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: see issue #48214
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0587]: type has conflicting packed and align representation hints
   --> $DIR/struct.rs:290:1
    |
290 | struct Unaligned3;
    | ^^^^^^^^^^^^^^^^^

error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied
   --> $DIR/struct.rs:328:10
    |
328 | #[derive(SplitAt)]
    |          ^^^^^^^ unsatisfied trait bound
    |
help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `SplitAtNotKnownLayout`
   --> $DIR/struct.rs:332:1
    |
332 | struct SplitAtNotKnownLayout([u8]);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: Consider adding `#[derive(KnownLayout)]` to `SplitAtNotKnownLayout`
    = help: the following other types implement trait `zerocopy_renamed::KnownLayout`:
              &T
              &mut T
              ()
              *const T
              *mut T
              AU16
              AtomicBool
              AtomicI16
            and 73 others
note: required by a bound in `SplitAt`
   --> $WORKSPACE/src/split_at.rs:61:27
    |
 61 | pub unsafe trait SplitAt: KnownLayout<PointerMetadata = usize> {
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `SplitAt`
    = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `u8: SplitAt` is not satisfied
   --> $DIR/struct.rs:334:10
    |
334 | #[derive(SplitAt, KnownLayout)]
    |          ^^^^^^^ the trait `SplitAt` is not implemented for `u8`
    |
    = note: Consider adding `#[derive(SplitAt)]` to `u8`
help: the following other types implement trait `SplitAt`
   --> $DIR/struct.rs:328:10
    |
328 | #[derive(SplitAt)]
    |          ^^^^^^^ `SplitAtNotKnownLayout`
...
334 | #[derive(SplitAt, KnownLayout)]
    |          ^^^^^^^ `SplitAtSized`
    |
   ::: $WORKSPACE/src/split_at.rs:251:1
    |
251 | unsafe impl<T> SplitAt for [T] {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `[T]`
    = help: see issue #48214
    = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `AU16: zerocopy_renamed::Unaligned` is not satisfied
   --> $DIR/struct.rs:244:28
    |
244 |         is_into_bytes_11::<IntoBytes11<AU16>>();
    |                            ^^^^^^^^^^^^^^^^^ unsatisfied trait bound
    |
help: the trait `zerocopy_renamed::Unaligned` is not implemented for `AU16`
   --> $DIR/../include.rs:64:5
    |
 64 |     pub struct AU16(pub u16);
    |     ^^^^^^^^^^^^^^^
    = note: Consider adding `#[derive(Unaligned)]` to `AU16`
    = help: the following other types implement trait `zerocopy_renamed::Unaligned`:
              ()
              AtomicBool
              AtomicI8
              AtomicU8
              Cell<T>
              F32<O>
              F64<O>
              I128<O>
            and 26 others
note: required for `IntoBytes11<AU16>` to implement `zerocopy_renamed::IntoBytes`
   --> $DIR/struct.rs:232:10
    |
232 | #[derive(IntoBytes)]
    |          ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro
note: required by a bound in `is_into_bytes_11`
   --> $DIR/struct.rs:242:24
    |
242 | fn is_into_bytes_11<T: IntoBytes>() {
    |                        ^^^^^^^^^ required by this bound in `is_into_bytes_11`
    = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 36 previous errors

Some errors have detailed explanations: E0277, E0587, E0588, E0692.
For more information about an error, try `rustc --explain E0277`.