error: unrecognized representation hint --> tests/ui-stable/enum.rs:20:8 | 20 | #[repr("foo")] | ^^^^^ error: unrecognized representation hint --> tests/ui-stable/enum.rs:27:8 | 27 | #[repr(foo)] | ^^^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:32:10 | 32 | #[derive(FromBytes)] | ^^^^^^^^^ | = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error: this conflicts with another representation hint --> tests/ui-stable/enum.rs:41:12 | 41 | #[repr(u8, u16)] | ^^^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:46:10 | 46 | #[derive(FromBytes)] | ^^^^^^^^^ | = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:78:1 | 78 | #[zerocopy(crate = "zerocopy_renamed")] | ^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:84:1 | 84 | #[zerocopy(crate = "zerocopy_renamed")] | ^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:104:1 | 104 | #[zerocopy(crate = "zerocopy_renamed")] | ^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:110:1 | 110 | #[zerocopy(crate = "zerocopy_renamed")] | ^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:117:1 | 117 | #[zerocopy(crate = "zerocopy_renamed")] | ^ error: FromZeros only supported on enums with a variant that has a discriminant of `0` --> tests/ui-stable/enum.rs:124:1 | 124 | / #[zerocopy(crate = "zerocopy_renamed")] 125 | | #[repr(u8)] 126 | | enum FromZeros4 { 127 | | A = 1, 128 | | B = 2, 129 | | } | |_^ error: FromZeros only supported on enums with a variant that has a discriminant of `0` help: This enum has discriminants which are not literal integers. One of those may define or imply which variant has a discriminant of zero. Use a literal integer to define or imply the variant with a discriminant of zero. --> tests/ui-stable/enum.rs:134:1 | 134 | / #[zerocopy(crate = "zerocopy_renamed")] 135 | | #[repr(i8)] 136 | | enum FromZeros5 { 137 | | A = NEGATIVE_ONE, 138 | | B, 139 | | } | |_^ error: FromZeros only supported on enums with a variant that has a discriminant of `0` --> tests/ui-stable/enum.rs:151:1 | 151 | / #[zerocopy(crate = "zerocopy_renamed")] 152 | | #[repr(u8)] 153 | | enum FromZeros7 { 154 | | A = 1, 155 | | B(NotFromZeros), 156 | | } | |_^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:162:10 | 162 | #[derive(FromBytes)] | ^^^^^^^^^ | = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:170:8 | 170 | #[repr(C)] | ^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:177:8 | 177 | #[repr(usize)] | ^^^^^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:184:8 | 184 | #[repr(isize)] | ^^^^^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:191:8 | 191 | #[repr(u32)] | ^^^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:198:8 | 198 | #[repr(i32)] | ^^^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:205:8 | 205 | #[repr(u64)] | ^^^ error: `FromBytes` only supported on enums with `#[repr(...)]` attributes `u8`, `i8`, `u16`, or `i16` --> tests/ui-stable/enum.rs:212:8 | 212 | #[repr(i64)] | ^^^ error: must have #[repr(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:483:10 | 483 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:490:10 | 490 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:497:10 | 497 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:504:10 | 504 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:511:10 | 511 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:518:10 | 518 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:525:10 | 525 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:532:10 | 532 | #[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(u8)] or #[repr(i8)] attribute in order to guarantee this type's alignment --> tests/ui-stable/enum.rs:539:10 | 539 | #[derive(Unaligned)] | ^^^^^^^^^ | = note: this error originates in the derive macro `Unaligned` (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/enum.rs:548:12 | 548 | #[repr(u8, align(2))] | ^^^^^ error: cannot derive `Unaligned` on type with alignment greater than 1 --> tests/ui-stable/enum.rs:555:12 | 555 | #[repr(i8, align(2))] | ^^^^^ error: this conflicts with another representation hint --> tests/ui-stable/enum.rs:562:18 | 562 | #[repr(align(1), align(2))] | ^^^^^ error: this conflicts with another representation hint --> tests/ui-stable/enum.rs:569:18 | 569 | #[repr(align(2), align(4))] | ^^^^^ error: must have #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:606:10 | 606 | #[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 #[repr(C)] or #[repr(Int)] attribute in order to guarantee this type's memory layout --> tests/ui-stable/enum.rs:613:10 | 613 | #[derive(IntoBytes)] | ^^^^^^^^^ | = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error: generic parameters may not be used in const operations --> tests/ui-stable/enum.rs:623:7 | 623 | A(T), | ^ cannot perform const operation using `T` | = note: type parameters may not be used in const expressions error[E0565]: meta item in `repr` must be an identifier --> tests/ui-stable/enum.rs:20:1 | 20 | #[repr("foo")] | ^^^^^^^^^^^^^^ error[E0552]: unrecognized representation hint --> tests/ui-stable/enum.rs:27:8 | 27 | #[repr(foo)] | ^^^ | = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize` = note: for more information, visit error[E0566]: conflicting representation hints --> tests/ui-stable/enum.rs:41:8 | 41 | #[repr(u8, u16)] | ^^ ^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #68585 = note: `#[deny(conflicting_repr_hints)]` (part of `#[deny(future_incompatible)]`) on by default error[E0277]: the trait bound `UnsafeCell<()>: Immutable` is not satisfied --> tests/ui-stable/enum.rs:56:10 | 56 | #[derive(Immutable)] | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell<()>` | = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>` = help: the following other types implement trait `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) error[E0277]: the trait bound `UnsafeCell: Immutable` is not satisfied --> tests/ui-stable/enum.rs:66:10 | 66 | #[derive(Immutable)] | ^^^^^^^^^ the trait `Immutable` is not implemented for `UnsafeCell` | = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell` = help: the following other types implement trait `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) error[E0277]: the trait bound `NotTryFromBytes: TryFromBytes` is not satisfied --> tests/ui-stable/enum.rs:92:10 | 92 | #[derive(TryFromBytes)] | ^^^^^^^^^^^^ unsatisfied trait bound | help: the trait `TryFromBytes` is not implemented for `NotTryFromBytes` --> tests/ui-stable/enum.rs:90:1 | 90 | struct NotTryFromBytes; | ^^^^^^^^^^^^^^^^^^^^^^ = note: Consider adding `#[derive(TryFromBytes)]` to `NotTryFromBytes` = help: the following other types implement trait `TryFromBytes`: () (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) (A, B, C, D, E, F, G, H) and $N others = help: see issue #48214 = note: this error originates in the derive macro `TryFromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `NotFromZeros: TryFromBytes` is not satisfied --> tests/ui-stable/enum.rs:143:10 | 143 | #[derive(FromZeros)] | ^^^^^^^^^ unsatisfied trait bound | help: the trait `TryFromBytes` is not implemented for `NotFromZeros` --> tests/ui-stable/enum.rs:141:1 | 141 | struct NotFromZeros; | ^^^^^^^^^^^^^^^^^^^ = note: Consider adding `#[derive(TryFromBytes)]` to `NotFromZeros` = help: the following other types implement trait `TryFromBytes`: () (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) (A, B, C, D, E, F, G, H) and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `NotFromZeros: FromZeros` is not satisfied --> tests/ui-stable/enum.rs:143:10 | 143 | #[derive(FromZeros)] | ^^^^^^^^^ unsatisfied trait bound | help: the trait `FromZeros` is not implemented for `NotFromZeros` --> tests/ui-stable/enum.rs:141:1 | 141 | struct NotFromZeros; | ^^^^^^^^^^^^^^^^^^^ = note: Consider adding `#[derive(FromZeros)]` to `NotFromZeros` = help: the following other types implement trait `FromZeros`: () (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) (A, B, C, D, E, F, G, H) and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromZeros` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `bool: FromBytes` is not satisfied --> tests/ui-stable/enum.rs:217:10 | 217 | #[derive(FromBytes)] | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool` | = note: Consider adding `#[derive(FromBytes)]` to `bool` = help: the following other types implement trait `FromBytes`: () (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) (A, B, C, D, E, F, G, H) and $N others = help: see issue #48214 = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `IntoBytes1` has 1 total byte(s) of padding --> tests/ui-stable/enum.rs:578:10 | 578 | #[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) error[E0277]: `IntoBytes2` has 3 total byte(s) of padding --> tests/ui-stable/enum.rs:591:10 | 591 | #[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) error[E0277]: `IntoBytes3` has 2 total byte(s) of padding --> tests/ui-stable/enum.rs:598:10 | 598 | #[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) error: generic `Self` types are currently not permitted in anonymous constants --> tests/ui-stable/enum.rs:619:10 | 619 | #[derive(IntoBytes)] | ^^^^^^^^^ | note: not a concrete type --> tests/ui-stable/enum.rs:619:10 | 619 | #[derive(IntoBytes)] | ^^^^^^^^^ = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `bool: FromBytes` is not satisfied --> tests/ui-stable/enum.rs:217:10 | 217 | #[derive(FromBytes)] | ^^^^^^^^^ the trait `FromBytes` is not implemented for `bool` | = note: Consider adding `#[derive(FromBytes)]` to `bool` = help: the following other types implement trait `FromBytes`: () (A, B) (A, B, C) (A, B, C, D) (A, B, C, D, E) (A, B, C, D, E, F) (A, B, C, D, E, F, G) (A, B, C, D, E, F, G, H) and $N others note: required for `FooU8` to implement `FromBytes` --> tests/ui-stable/enum.rs:217:10 | 217 | #[derive(FromBytes)] | ^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro note: required by a bound in `assert_is_from_bytes` --> tests/ui-stable/enum.rs:217:10 | 217 | #[derive(FromBytes)] | ^^^^^^^^^ required by this bound in `assert_is_from_bytes` = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)