Debian Codegraph @

debian/missing-sources/zerocopy-derive/tests/ui-nightly/union.stderr

raw
1 error: unsupported on types with type parameters
2 --> tests/ui-nightly/union.rs:35:10
3 |
4 35 | #[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:51:10
11 |
12 51 | #[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:58:10
19 |
20 58 | #[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:71:11
27 |
28 71 | #[repr(C, align(2))]
29 | ^^^^^^^^
30
31 error: this conflicts with another representation hint
32 --> tests/ui-nightly/union.rs:88:8
33 |
34 88 | #[repr(packed, align(2))]
35 | ^^^^^^^^^^^^^^^^
36
37 error: this conflicts with another representation hint
38 --> tests/ui-nightly/union.rs:95:8
39 |
40 95 | #[repr(align(1), align(2))]
41 | ^^^^^^^^^^^^^^^^^^
42
43 error: this conflicts with another representation hint
44 --> tests/ui-nightly/union.rs:102:8
45 |
46 102 | #[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:107:10
51 |
52 107 | #[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:114:10
59 |
60 114 | #[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:42:10
67 |
68 42 | #[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_renamed::Immutable` is not satisfied
80 --> tests/ui-nightly/union.rs:25:10
81 |
82 25 | #[derive(Immutable)]
83 | ^^^^^^^^^ the trait `zerocopy_renamed::Immutable` is not implemented for `UnsafeCell<()>`
84 |
85 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
86 = help: the following other types implement trait `zerocopy_renamed::Immutable`:
87 &T
88 &mut T
89 ()
90 (A, B)
91 (A, B, C)
92 (A, B, C, D)
93 (A, B, C, D, E)
94 (A, B, C, D, E, F)
95 and $N others
96 = note: required for `ManuallyDrop<UnsafeCell<()>>` to implement `zerocopy_renamed::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:42:10
106 |
107 42 | #[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 --> $WORKSPACE/src/util/macro_util.rs
116 |
117 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
118 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119 = help: see issue #48214
120 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
121 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
122 |
123 9 + #![feature(trivial_bounds)]
124 |
125
126 error[E0587]: type has conflicting packed and align representation hints
127 --> tests/ui-nightly/union.rs:89:1
128 |
129 89 | union Unaligned3 {
130 | ^^^^^^^^^^^^^^^^
131
132 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
133 --> tests/ui-nightly/union.rs:117:1
134 |
135 117 | union Unaligned7 {
136 | ^^^^^^^^^^^^^^^^
137 |
138 note: `AU16` has a `#[repr(align)]` attribute
139 --> tests/ui-nightly/../include.rs
140 |
141 64 | pub struct AU16(pub u16);
142 | ^^^^^^^^^^^^^^^