Debian Codegraph @

.cargo/vendor/zerocopy-derive/tests/ui-nightly/union.stderr

raw
1 error: unsupported on types with type parameters
2 --> tests/ui-nightly/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-nightly/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-nightly/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-nightly/union.rs:65:11
27 |
28 65 | #[repr(C, align(2))]
29 | ^^^^^^^^
30
31 error: this conflicts with another representation hint
32 --> tests/ui-nightly/union.rs:81:8
33 |
34 81 | #[repr(packed, align(2))]
35 | ^^^^^^^^^^^^^^^^
36
37 error: this conflicts with another representation hint
38 --> tests/ui-nightly/union.rs:87:8
39 |
40 87 | #[repr(align(1), align(2))]
41 | ^^^^^^^^^^^^^^^^^^
42
43 error: this conflicts with another representation hint
44 --> tests/ui-nightly/union.rs:93:8
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-nightly/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-nightly/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-nightly/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-nightly/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 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
100 |
101 9 + #![feature(trivial_bounds)]
102 |
103
104 error[E0277]: `IntoBytes2` has 1 total byte(s) of padding
105 --> tests/ui-nightly/union.rs:40:10
106 |
107 40 | #[derive(IntoBytes)]
108 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
109 |
110 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
111 = note: consider adding explicit fields where padding would be
112 = note: consider using `#[repr(packed)]` to remove padding
113 = help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()`
114 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
115 = help: see issue #48214
116 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
117 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
118 |
119 9 + #![feature(trivial_bounds)]
120 |
121
122 error[E0587]: type has conflicting packed and align representation hints
123 --> tests/ui-nightly/union.rs:82:1
124 |
125 82 | union Unaligned3 {
126 | ^^^^^^^^^^^^^^^^
127
128 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
129 --> tests/ui-nightly/union.rs:106:1
130 |
131 106 | union Unaligned7 {
132 | ^^^^^^^^^^^^^^^^
133 |
134 note: `AU16` has a `#[repr(align)]` attribute
135 --> tests/ui-nightly/../include.rs
136 |
137 63 | pub struct AU16(pub u16);
138 | ^^^^^^^^^^^^^^^