error: this conflicts with another representation hint --> tests/ui-nightly/struct.rs:185:8 | 185 | #[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 --> tests/ui-nightly/struct.rs:190:10 | 190 | #[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 --> tests/ui-nightly/struct.rs:196:10 | 196 | #[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 --> tests/ui-nightly/struct.rs:221:10 | 221 | #[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-nightly/struct.rs:234:11 | 234 | #[repr(C, align(2))] | ^^^^^^^^ error: this conflicts with another representation hint --> tests/ui-nightly/struct.rs:239:8 | 239 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ error: this conflicts with another representation hint --> tests/ui-nightly/struct.rs:246:8 | 246 | #[repr(packed, align(2))] | ^^^^^^^^^^^^^^^^ error: this conflicts with another representation hint --> tests/ui-nightly/struct.rs:251:8 | 251 | #[repr(align(1), align(2))] | ^^^^^^^^^^^^^^^^^^ error: this conflicts with another representation hint --> tests/ui-nightly/struct.rs:256:8 | 256 | #[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-nightly/struct.rs:259:10 | 259 | #[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-nightly/struct.rs:263:10 | 263 | #[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 --> tests/ui-nightly/struct.rs:272:19 | 272 | #[repr(packed(2), C)] | ___________________^ 273 | | #[derive(Unaligned)] 274 | | #[zerocopy(crate = "zerocopy_renamed")] 275 | | #[repr(C, packed(2))] | |________^ error[E0692]: transparent struct cannot have other repr hints --> tests/ui-nightly/struct.rs:239:8 | 239 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ ^^^^^^^^ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/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` --> tests/ui-nightly/struct.rs:33:8 | 33 | 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/struct.rs:37:10 | 37 | #[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` --> tests/ui-nightly/struct.rs:39:8 | 39 | 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `NotKnownLayoutDst: zerocopy_renamed::KnownLayout` is not satisfied --> tests/ui-nightly/struct.rs:43:10 | 43 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `NotKnownLayoutDst` --> tests/ui-nightly/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 $N 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `NotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied --> tests/ui-nightly/struct.rs:50:10 | 50 | #[derive(KnownLayout)] | ^^^^^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `NotKnownLayout` --> tests/ui-nightly/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 $N 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `UnsafeCell<()>: zerocopy_renamed::Immutable` is not satisfied --> tests/ui-nightly/struct.rs:59:10 | 59 | #[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 $N 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `UnsafeCell: zerocopy_renamed::Immutable` is not satisfied --> tests/ui-nightly/struct.rs:65:10 | 65 | #[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 $N others = note: required for `[UnsafeCell; 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> tests/ui-nightly/struct.rs:78:1 | 78 | struct TryFromBytesPacked { | ^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `AU16` has a `#[repr(align)]` attribute --> tests/ui-nightly/../include.rs | | pub struct AU16(pub u16); | ^^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> tests/ui-nightly/struct.rs:85:1 | 85 | struct TryFromBytesPackedN { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `AU16` has a `#[repr(align)]` attribute --> tests/ui-nightly/../include.rs | | pub struct AU16(pub u16); | ^^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> tests/ui-nightly/struct.rs:92:1 | 92 | struct TryFromBytesCPacked { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `AU16` has a `#[repr(align)]` attribute --> tests/ui-nightly/../include.rs | | pub struct AU16(pub u16); | ^^^^^^^^^^^^^^^ error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type --> tests/ui-nightly/struct.rs:99:1 | 99 | struct TryFromBytesCPackedN { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: `AU16` has a `#[repr(align)]` attribute --> tests/ui-nightly/../include.rs | | pub struct AU16(pub u16); | ^^^^^^^^^^^^^^^ error[E0277]: the trait bound `AU16: zerocopy_renamed::Unaligned` is not satisfied --> tests/ui-nightly/struct.rs:110:10 | 110 | #[derive(IntoBytes)] | ^^^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::Unaligned` is not implemented for `AU16` --> tests/ui-nightly/../include.rs | 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 F32 F64 I128 and $N 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: `IntoBytes2` has 1 total byte(s) of padding --> tests/ui-nightly/struct.rs:118:10 | 118 | #[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` is not implemented for `()` but trait `PaddingFree` is implemented for it --> $WORKSPACE/src/util/macro_util.rs | 64 | impl PaddingFree 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: `IntoBytes3` has 1 total byte(s) of padding --> tests/ui-nightly/struct.rs:126:10 | 126 | #[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` is not implemented for `()` but trait `PaddingFree` is implemented for it --> $WORKSPACE/src/util/macro_util.rs | 64 | impl PaddingFree 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the size for values of type `[u8]` cannot be known at compilation time --> tests/ui-nightly/struct.rs:143:10 | 143 | #[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` --> tests/ui-nightly/struct.rs:146:8 | 146 | struct IntoBytes4 { | ^^^^^^^^^^ = note: required for `IntoBytes4` to implement `zerocopy_renamed::util::macro_util::__size_of::Sized` note: required by a bound in `zerocopy_renamed::util::macro_util::__size_of::size_of` --> $WORKSPACE/src/util/macro_util.rs | | pub const fn size_of() -> 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 --> tests/ui-nightly/struct.rs:148:8 | 148 | 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 `zerocopy_renamed::util::macro_util::__size_of::Sized` note: required by a bound in `zerocopy_renamed::util::macro_util::__size_of::size_of` --> $WORKSPACE/src/util/macro_util.rs | | pub const fn size_of() -> usize { | ^^^^^ required by this bound in `size_of` error[E0277]: `IntoBytes5` has one or more padding bytes --> tests/ui-nightly/struct.rs:153:10 | 153 | #[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` is not implemented for `()` but trait `DynamicPaddingFree` is implemented for it --> $WORKSPACE/src/util/macro_util.rs | 82 | impl DynamicPaddingFree 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: `IntoBytes6` has one or more padding bytes --> tests/ui-nightly/struct.rs:163:10 | 163 | #[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` is not implemented for `()` but trait `DynamicPaddingFree` is implemented for it --> $WORKSPACE/src/util/macro_util.rs | 82 | impl DynamicPaddingFree 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: `IntoBytes7` has one or more padding bytes --> tests/ui-nightly/struct.rs:174:10 | 174 | #[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` is not implemented for `()` but trait `DynamicPaddingFree` is implemented for it --> $WORKSPACE/src/util/macro_util.rs | 82 | impl DynamicPaddingFree 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0587]: type has conflicting packed and align representation hints --> tests/ui-nightly/struct.rs:247:1 | 247 | struct Unaligned3; | ^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied --> tests/ui-nightly/struct.rs:278:10 | 278 | #[derive(SplitAt)] | ^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `SplitAtNotKnownLayout` --> tests/ui-nightly/struct.rs:281:1 | 281 | 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 $N others note: required by a bound in `SplitAt` --> $WORKSPACE/src/split_at.rs | 61 | pub unsafe trait SplitAt: KnownLayout { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 --> tests/ui-nightly/struct.rs:283:10 | 283 | #[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` --> tests/ui-nightly/struct.rs:278:10 | 278 | #[derive(SplitAt)] | ^^^^^^^ `SplitAtNotKnownLayout` ... 283 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ `SplitAtSized` | ::: $WORKSPACE/src/split_at.rs | | unsafe impl 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) help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | 9 + #![feature(trivial_bounds)] | error[E0277]: the trait bound `AU16: zerocopy_renamed::Unaligned` is not satisfied --> tests/ui-nightly/struct.rs:216:28 | 216 | is_into_bytes_11::>(); | ^^^^^^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::Unaligned` is not implemented for `AU16` --> tests/ui-nightly/../include.rs | 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 F32 F64 I128 and $N others note: required for `IntoBytes11` to implement `zerocopy_renamed::IntoBytes` --> tests/ui-nightly/struct.rs:204:10 | 204 | #[derive(IntoBytes)] | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro note: required by a bound in `is_into_bytes_11` --> tests/ui-nightly/struct.rs:214:24 | 214 | fn is_into_bytes_11() { | ^^^^^^^^^ 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)