1error: unsupported on types with type parameters 2 --> tests/ui-stable/union.rs:33:10 3 | 433 | #[derive(IntoBytes)] 5 | ^^^^^^^^^ 6 | 7 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 8 9error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)] 10 --> tests/ui-stable/union.rs:47:10 11 | 1247 | #[derive(IntoBytes)] 13 | ^^^^^^^^^ 14 | 15 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 16 17error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)] 18 --> tests/ui-stable/union.rs:53:10 19 | 2053 | #[derive(IntoBytes)] 21 | ^^^^^^^^^ 22 | 23 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 24 25error: cannot derive `Unaligned` on type with alignment greater than 1 26 --> tests/ui-stable/union.rs:64:11 27 | 2864 | #[repr(C, align(2))] 29 | ^^^^^ 30 31error: this conflicts with another representation hint 32 --> tests/ui-stable/union.rs:80:16 33 | 3480 | #[repr(packed, align(2))] 35 | ^^^^^ 36 37error: this conflicts with another representation hint 38 --> tests/ui-stable/union.rs:86:18 39 | 4086 | #[repr(align(1), align(2))] 41 | ^^^^^ 42 43error: this conflicts with another representation hint 44 --> tests/ui-stable/union.rs:92:18 45 | 4692 | #[repr(align(2), align(4))] 47 | ^^^^^ 48 49error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment 50 --> tests/ui-stable/union.rs:97:10 51 | 5297 | #[derive(Unaligned)] 53 | ^^^^^^^^^ 54 | 55 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) 56 57error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment 58 --> tests/ui-stable/union.rs:103:10 59 | 60103 | #[derive(Unaligned)] 61 | ^^^^^^^^^ 62 | 63 = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) 64 65warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes` 66 --> tests/ui-stable/union.rs:39:10 67 | 6839 | #[derive(IntoBytes)] 69 | ^^^^^^^^^ 70 | 71 = help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows` 72 = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate 73 = help: try referring to `IntoBytes` crate for guidance on how handle this unexpected cfg 74 = 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` 75 = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration 76 = note: `#[warn(unexpected_cfgs)]` on by default 77 = note: this warning originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 78 79error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied 80 --> tests/ui-stable/union.rs:24:10 81 | 8224 | #[derive(Immutable)] 83 | ^^^^^^^^^ the trait `zerocopy::Immutable` is not implemented for `UnsafeCell<()>` 84 | 85 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>` 86 = help: the following other types implement trait `zerocopy::Immutable`: 87 &T 88 &mut T 89 () 90 *const T 91 *mut T 92 AU16 93 F32<O> 94 F64<O> 95 and $N others 96 = note: required for `ManuallyDrop<UnsafeCell<()>>` to implement `zerocopy::Immutable` 97 = help: see issue #48214 98 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info) 99 100error[E0277]: `IntoBytes2` has inter-field padding 101 --> tests/ui-stable/union.rs:39:10 102 | 10339 | #[derive(IntoBytes)] 104 | ^^^^^^^^^ types with padding cannot implement `IntoBytes` 105 | 106 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields 107 = note: consider adding explicit fields where padding would be 108 = note: consider using `#[repr(packed)]` to remove inter-field padding 109 = help: the trait `PaddingFree<IntoBytes2, true>` is not implemented for `()` 110 but trait `PaddingFree<IntoBytes2, false>` is implemented for it 111 = help: see issue #48214 112 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) 113 114error[E0587]: type has conflicting packed and align representation hints 115 --> tests/ui-stable/union.rs:81:1 116 | 11781 | union Unaligned3 { 118 | ^^^^^^^^^^^^^^^^ 119 120error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type 121 --> tests/ui-stable/union.rs:105:1 122 | 123105 | union Unaligned7 { 124 | ^^^^^^^^^^^^^^^^ 125 | 126note: `AU16` has a `#[repr(align)]` attribute 127 --> tests/ui-stable/../include.rs 128 | 129 | pub struct AU16(pub u16); 130 | ^^^^^^^^^^^^^^^ 131