• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error: unsupported on types with type parameters
2  --> tests/ui-nightly/union.rs:33:10
3   |
433 | #[derive(IntoBytes)]
5   |          ^^^^^^^^^
6   |
7   = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
8
9error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)]
10  --> tests/ui-nightly/union.rs:47:10
11   |
1247 | #[derive(IntoBytes)]
13   |          ^^^^^^^^^
14   |
15   = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
16
17error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)]
18  --> tests/ui-nightly/union.rs:53:10
19   |
2053 | #[derive(IntoBytes)]
21   |          ^^^^^^^^^
22   |
23   = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
24
25error: cannot derive `Unaligned` on type with alignment greater than 1
26  --> tests/ui-nightly/union.rs:64:11
27   |
2864 | #[repr(C, align(2))]
29   |           ^^^^^^^^
30
31error: this conflicts with another representation hint
32  --> tests/ui-nightly/union.rs:80:8
33   |
3480 | #[repr(packed, align(2))]
35   |        ^^^^^^^^^^^^^^^^
36
37error: this conflicts with another representation hint
38  --> tests/ui-nightly/union.rs:86:8
39   |
4086 | #[repr(align(1), align(2))]
41   |        ^^^^^^^^^^^^^^^^^^
42
43error: this conflicts with another representation hint
44  --> tests/ui-nightly/union.rs:92:8
45   |
4692 | #[repr(align(2), align(4))]
47   |        ^^^^^^^^^^^^^^^^^^
48
49error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
50  --> tests/ui-nightly/union.rs:97:10
51   |
5297 | #[derive(Unaligned)]
53   |          ^^^^^^^^^
54   |
55   = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
56
57error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
58   --> tests/ui-nightly/union.rs:103:10
59    |
60103 | #[derive(Unaligned)]
61    |          ^^^^^^^^^
62    |
63    = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
64
65error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied
66  --> tests/ui-nightly/union.rs:24:10
67   |
6824 | #[derive(Immutable)]
69   |          ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>`
70   |
71   = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
72   = help: the following other types implement trait `zerocopy::Immutable`:
73             &T
74             &mut T
75             ()
76             *const T
77             *mut T
78             AU16
79             F32<O>
80             F64<O>
81           and $N others
82   = note: required for `ManuallyDrop<UnsafeCell<()>>` to implement `zerocopy::Immutable`
83   = help: see issue #48214
84   = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
85help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
86   |
879  + #![feature(trivial_bounds)]
88   |
89
90error[E0277]: `IntoBytes2` has inter-field padding
91  --> tests/ui-nightly/union.rs:39:10
92   |
9339 | #[derive(IntoBytes)]
94   |          ^^^^^^^^^ types with padding cannot implement `IntoBytes`
95   |
96   = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
97   = note: consider adding explicit fields where padding would be
98   = note: consider using `#[repr(packed)]` to remove inter-field padding
99   = help: the trait `PaddingFree<IntoBytes2, true>` is not implemented for `()`
100           but trait `PaddingFree<IntoBytes2, false>` is implemented for it
101   = help: see issue #48214
102   = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
103help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
104   |
1059  + #![feature(trivial_bounds)]
106   |
107
108error[E0587]: type has conflicting packed and align representation hints
109  --> tests/ui-nightly/union.rs:81:1
110   |
11181 | union Unaligned3 {
112   | ^^^^^^^^^^^^^^^^
113
114error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
115   --> tests/ui-nightly/union.rs:105:1
116    |
117105 | union Unaligned7 {
118    | ^^^^^^^^^^^^^^^^
119    |
120note: `AU16` has a `#[repr(align)]` attribute
121   --> tests/ui-nightly/../include.rs
122    |
123    |     pub struct AU16(pub u16);
124    |     ^^^^^^^^^^^^^^^
125