| 1 |
error: unsupported on types with type parameters |
| 2 |
--> tests/ui-stable/union.rs:34:10 |
| 3 |
| |
| 4 |
34 | #[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 |
|
| 9 |
error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)] |
| 10 |
--> tests/ui-stable/union.rs:48:10 |
| 11 |
| |
| 12 |
48 | #[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 |
|
| 17 |
error: must be #[repr(C)], #[repr(packed)], or #[repr(transparent)] |
| 18 |
--> tests/ui-stable/union.rs:54:10 |
| 19 |
| |
| 20 |
54 | #[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 |
|
| 25 |
error: cannot derive `Unaligned` on type with alignment greater than 1 |
| 26 |
--> tests/ui-stable/union.rs:65:11 |
| 27 |
| |
| 28 |
65 | #[repr(C, align(2))] |
| 29 |
| ^^^^^ |
| 30 |
|
| 31 |
error: this conflicts with another representation hint |
| 32 |
--> tests/ui-stable/union.rs:81:16 |
| 33 |
| |
| 34 |
81 | #[repr(packed, align(2))] |
| 35 |
| ^^^^^ |
| 36 |
|
| 37 |
error: this conflicts with another representation hint |
| 38 |
--> tests/ui-stable/union.rs:87:18 |
| 39 |
| |
| 40 |
87 | #[repr(align(1), align(2))] |
| 41 |
| ^^^^^ |
| 42 |
|
| 43 |
error: this conflicts with another representation hint |
| 44 |
--> tests/ui-stable/union.rs:93:18 |
| 45 |
| |
| 46 |
93 | #[repr(align(2), align(4))] |
| 47 |
| ^^^^^ |
| 48 |
|
| 49 |
error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment |
| 50 |
--> tests/ui-stable/union.rs:98:10 |
| 51 |
| |
| 52 |
98 | #[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 |
|
| 57 |
error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment |
| 58 |
--> tests/ui-stable/union.rs:104:10 |
| 59 |
| |
| 60 |
104 | #[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 |
|
| 65 |
warning: unexpected `cfg` condition name: `zerocopy_derive_union_into_bytes` |
| 66 |
--> tests/ui-stable/union.rs:40:10 |
| 67 |
| |
| 68 |
40 | #[derive(IntoBytes)] |
| 69 |
| ^^^^^^^^^ |
| 70 |
| |
| 71 |
= help: expected names are: `docsrs`, `feature`, and `test` and 31 more |
| 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 |
|
| 79 |
error[E0277]: the trait bound `UnsafeCell<()>: zerocopy::Immutable` is not satisfied |
| 80 |
--> tests/ui-stable/union.rs:25:10 |
| 81 |
| |
| 82 |
25 | #[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 |
|
| 100 |
error[E0277]: `IntoBytes2` has 1 total byte(s) of padding |
| 101 |
--> tests/ui-stable/union.rs:40:10 |
| 102 |
| |
| 103 |
40 | #[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 padding |
| 109 |
= help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()` |
| 110 |
but trait `PaddingFree<IntoBytes2, 0>` 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 |
|
| 114 |
error[E0587]: type has conflicting packed and align representation hints |
| 115 |
--> tests/ui-stable/union.rs:82:1 |
| 116 |
| |
| 117 |
82 | union Unaligned3 { |
| 118 |
| ^^^^^^^^^^^^^^^^ |
| 119 |
|
| 120 |
error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type |
| 121 |
--> tests/ui-stable/union.rs:106:1 |
| 122 |
| |
| 123 |
106 | union Unaligned7 { |
| 124 |
| ^^^^^^^^^^^^^^^^ |
| 125 |
| |
| 126 |
note: `AU16` has a `#[repr(align)]` attribute |
| 127 |
--> tests/ui-stable/../include.rs |
| 128 |
| |
| 129 |
| pub struct AU16(pub u16); |
| 130 |
| ^^^^^^^^^^^^^^^ |