131 lines
5.1 KiB
Plaintext
131 lines
5.1 KiB
Plaintext
error: unsupported on types with type parameters
|
|
--> tests/ui-stable/union.rs:34:10
|
|
|
|
|
34 | #[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:48:10
|
|
|
|
|
48 | #[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:54:10
|
|
|
|
|
54 | #[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:65:11
|
|
|
|
|
65 | #[repr(C, align(2))]
|
|
| ^^^^^
|
|
|
|
error: this conflicts with another representation hint
|
|
--> tests/ui-stable/union.rs:81:16
|
|
|
|
|
81 | #[repr(packed, align(2))]
|
|
| ^^^^^
|
|
|
|
error: this conflicts with another representation hint
|
|
--> tests/ui-stable/union.rs:87:18
|
|
|
|
|
87 | #[repr(align(1), align(2))]
|
|
| ^^^^^
|
|
|
|
error: this conflicts with another representation hint
|
|
--> tests/ui-stable/union.rs:93:18
|
|
|
|
|
93 | #[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:98:10
|
|
|
|
|
98 | #[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:104:10
|
|
|
|
|
104 | #[derive(Unaligned)]
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes`
|
|
--> tests/ui-stable/union.rs:40:10
|
|
|
|
|
40 | #[derive(IntoBytes)]
|
|
| ^^^^^^^^^
|
|
|
|
|
= help: expected names are: `docsrs`, `feature`, and `test` and 31 more
|
|
= note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate
|
|
= help: try referring to `IntoBytes` crate for guidance on how handle this unexpected cfg
|
|
= help: the derive macro `IntoBytes` may come from an old version of the `zerocopy_derive` crate, try updating your dependency with `cargo update -p zerocopy_derive`
|
|
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
|
|
= note: `#[warn(unexpected_cfgs)]` on by default
|
|
= note: this warning originates in the derive macro `IntoBytes` (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:25:10
|
|
|
|
|
25 | #[derive(Immutable)]
|
|
| ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>`
|
|
|
|
|
= 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 1 total byte(s) of padding
|
|
--> tests/ui-stable/union.rs:40:10
|
|
|
|
|
40 | #[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
|
|
= 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:82:1
|
|
|
|
|
82 | union Unaligned3 {
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
|
|
--> tests/ui-stable/union.rs:106:1
|
|
|
|
|
106 | union Unaligned7 {
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
note: `AU16` has a `#[repr(align)]` attribute
|
|
--> tests/ui-stable/../include.rs
|
|
|
|
|
| pub struct AU16(pub u16);
|
|
| ^^^^^^^^^^^^^^^
|