blob: 753a5814aa3e348e3caade68ba7ec443f301667e [file] [log] [blame]
error: this conflicts with another representation hint
--> tests/ui-nightly/struct.rs:167:8
|
167 | #[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:172:10
|
172 | #[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:177:10
|
177 | #[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:200:10
|
200 | #[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:211:11
|
211 | #[repr(C, align(2))]
| ^^^^^^^^
error: this conflicts with another representation hint
--> tests/ui-nightly/struct.rs:215:8
|
215 | #[repr(transparent, align(2))]
| ^^^^^^^^^^^
error: this conflicts with another representation hint
--> tests/ui-nightly/struct.rs:221:8
|
221 | #[repr(packed, align(2))]
| ^^^^^^^^^^^^^^^^
error: this conflicts with another representation hint
--> tests/ui-nightly/struct.rs:225:8
|
225 | #[repr(align(1), align(2))]
| ^^^^^^^^^^^^^^^^^^
error: this conflicts with another representation hint
--> tests/ui-nightly/struct.rs:229:8
|
229 | #[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:232:10
|
232 | #[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:235:10
|
235 | #[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:243:19
|
243 | #[repr(packed(2), C)]
| ___________________^
244 | | #[derive(Unaligned)]
245 | | #[repr(C, packed(2))]
| |________^
error[E0692]: transparent struct cannot have other repr hints
--> tests/ui-nightly/struct.rs:215:8
|
215 | #[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:32:8
|
32 | 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:36:10
|
36 | #[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:37:8
|
37 | 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::KnownLayout` is not satisfied
--> tests/ui-nightly/struct.rs:41:10
|
41 | #[derive(KnownLayout)]
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::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::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::KnownLayout` is not satisfied
--> tests/ui-nightly/struct.rs:47:10
|
47 | #[derive(KnownLayout)]
| ^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::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::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::Immutable` is not satisfied
--> tests/ui-nightly/struct.rs:55:10
|
55 | #[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
= 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<u8>: zerocopy::Immutable` is not satisfied
--> tests/ui-nightly/struct.rs:60:10
|
60 | #[derive(Immutable)]
| ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<u8>`
|
= note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<u8>`
= 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 `[UnsafeCell<u8>; 0]` 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)
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:71:1
|
71 | 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:77:1
|
77 | 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:83:1
|
83 | 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:89:1
|
89 | 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::Unaligned` is not satisfied
--> tests/ui-nightly/struct.rs:100:10
|
100 | #[derive(IntoBytes)]
| ^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::Unaligned` is not implemented for `AU16`
--> tests/ui-nightly/../include.rs
|
63 | pub struct AU16(pub u16);
| ^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(Unaligned)]` to `AU16`
= help: the following other types implement trait `zerocopy::Unaligned`:
()
AtomicBool
AtomicI8
AtomicU8
Cell<T>
F32<O>
F64<O>
I128<O>
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:107:10
|
107 | #[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)
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:114:10
|
114 | #[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
= 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:130:10
|
130 | #[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:132:8
|
132 | 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
|
| 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
--> tests/ui-nightly/struct.rs:134:8
|
134 | 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
|
| 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
--> tests/ui-nightly/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 `DynamicPaddingFree<IntoBytes5, true>` is not implemented for `()`
but trait `DynamicPaddingFree<IntoBytes5, false>` 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)
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:148:10
|
148 | #[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
= 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:158:10
|
158 | #[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
= 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:222:1
|
222 | struct Unaligned3;
| ^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy::KnownLayout` is not satisfied
--> tests/ui-nightly/struct.rs:248:10
|
248 | #[derive(SplitAt)]
| ^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::KnownLayout` is not implemented for `SplitAtNotKnownLayout`
--> tests/ui-nightly/struct.rs:250:1
|
250 | struct SplitAtNotKnownLayout([u8]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(KnownLayout)]` to `SplitAtNotKnownLayout`
= help: the following other types implement trait `zerocopy::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<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
--> tests/ui-nightly/struct.rs:252:10
|
252 | #[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`:
SplitAtNotKnownLayout
SplitAtSized
[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::Unaligned` is not satisfied
--> tests/ui-nightly/struct.rs:195:28
|
195 | is_into_bytes_11::<IntoBytes11<AU16>>();
| ^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `zerocopy::Unaligned` is not implemented for `AU16`
--> tests/ui-nightly/../include.rs
|
63 | pub struct AU16(pub u16);
| ^^^^^^^^^^^^^^^
= note: Consider adding `#[derive(Unaligned)]` to `AU16`
= help: the following other types implement trait `zerocopy::Unaligned`:
()
AtomicBool
AtomicI8
AtomicU8
Cell<T>
F32<O>
F64<O>
I128<O>
and $N others
note: required for `IntoBytes11<AU16>` to implement `zerocopy::IntoBytes`
--> tests/ui-nightly/struct.rs:184:10
|
184 | #[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:193:24
|
193 | 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)