blob: 141929e1154a3c716c37f5af4a5fbc5ed8dac98b [file] [log] [blame]
error: unsupported on types with type parameters
--> tests/ui-stable/union.rs:33:10
|
33 | #[derive(IntoBytes)]
| ^^^^^^^^^
|
= note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)]
--> tests/ui-stable/union.rs:47:10
|
47 | #[derive(IntoBytes)]
| ^^^^^^^^^
|
= note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)]
--> tests/ui-stable/union.rs:53:10
|
53 | #[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
--> tests/ui-stable/union.rs:64:11
|
64 | #[repr(C, align(2))]
| ^^^^^
error: this conflicts with another representation hint
--> tests/ui-stable/union.rs:80:16
|
80 | #[repr(packed, align(2))]
| ^^^^^
error: this conflicts with another representation hint
--> tests/ui-stable/union.rs:86:18
|
86 | #[repr(align(1), align(2))]
| ^^^^^
error: this conflicts with another representation hint
--> tests/ui-stable/union.rs:92:18
|
92 | #[repr(align(2), align(4))]
| ^^^^^
error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment
--> tests/ui-stable/union.rs:97:10
|
97 | #[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
--> tests/ui-stable/union.rs:103:10
|
103 | #[derive(Unaligned)]
| ^^^^^^^^^
|
= note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied
--> tests/ui-stable/union.rs:24:10
|
24 | #[derive(Immutable)]
| ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>`, which is required by `ManuallyDrop<UnsafeCell<()>>: zerocopy::Immutable`
|
= note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
= help: the following other types implement trait `zerocopy::Immutable`:
&T
&mut T
()
*const T
*mut T
AU16
F32<O>
F64<O>
and $N others
= note: required for `ManuallyDrop<UnsafeCell<()>>` to implement `zerocopy::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[E0277]: `IntoBytes2` has inter-field padding
--> tests/ui-stable/union.rs:39:10
|
39 | #[derive(IntoBytes)]
| ^^^^^^^^^ types with padding cannot implement `IntoBytes`
|
= help: the trait `PaddingFree<IntoBytes2, true>` is not implemented for `()`
= 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 inter-field padding
= help: the trait `PaddingFree<IntoBytes2, false>` is implemented 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
--> tests/ui-stable/union.rs:81:1
|
81 | union Unaligned3 {
| ^^^^^^^^^^^^^^^^
error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
--> tests/ui-stable/union.rs:105:1
|
105 | union Unaligned7 {
| ^^^^^^^^^^^^^^^^
|
note: `AU16` has a `#[repr(align)]` attribute
--> tests/ui-stable/../include.rs
|
| pub struct AU16(pub u16);
| ^^^^^^^^^^^^^^^