Debian Codegraph @

debian/rust-vendor/zerocopy-derive/tests/ui/union.nightly.stderr

raw
1 error: unsupported on types with type parameters
2 --> $DIR/union.rs:36:10
3 |
4 36 | #[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 --> $DIR/union.rs:55:10
11 |
12 55 | #[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 --> $DIR/union.rs:63:10
19 |
20 63 | #[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 --> $DIR/union.rs:77:11
27 |
28 77 | #[repr(C, align(2))]
29 | ^^^^^^^^
30
31 error: this conflicts with another representation hint
32 --> $DIR/union.rs:95:8
33 |
34 95 | #[repr(packed, align(2))]
35 | ^^^^^^^^^^^^^^^^
36
37 error: this conflicts with another representation hint
38 --> $DIR/union.rs:104:8
39 |
40 104 | #[repr(align(1), align(2))]
41 | ^^^^^^^^^^^^^^^^^^
42
43 error: this conflicts with another representation hint
44 --> $DIR/union.rs:112:8
45 |
46 112 | #[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 --> $DIR/union.rs:118:10
51 |
52 118 | #[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 --> $DIR/union.rs:126:10
59 |
60 126 | #[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 error[E0277]: the trait bound `UnsafeCell<()>: zerocopy_renamed::Immutable` is not satisfied
66 --> $DIR/union.rs:25:10
67 |
68 25 | #[derive(Immutable)]
69 | ^^^^^^^^^ the trait `zerocopy_renamed::Immutable` is not implemented for `UnsafeCell<()>`
70 |
71 = note: Consider adding `#[derive(Immutable)]` to `UnsafeCell<()>`
72 = help: the following other types implement trait `zerocopy_renamed::Immutable`:
73 &T
74 &mut T
75 ()
76 (A, B)
77 (A, B, C)
78 (A, B, C, D)
79 (A, B, C, D, E)
80 (A, B, C, D, E, F)
81 and 129 others
82 = note: required for `ManuallyDrop<UnsafeCell<()>>` to implement `zerocopy_renamed::Immutable`
83 = help: see issue #48214
84 = note: the full name for the type has been written to '/long-type-HASH.txt'
85 = note: consider using `--verbose` to print the full type name to the console
86 = note: this error originates in the derive macro `Immutable` (in Nightly builds, run with -Z macro-backtrace for more info)
87 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
88 |
89 9 + #![feature(trivial_bounds)]
90 |
91
92 error[E0277]: `IntoBytes2` has 1 total byte(s) of padding
93 --> $DIR/union.rs:44:10
94 |
95 44 | #[derive(IntoBytes)]
96 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
97 |
98 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
99 = note: consider adding explicit fields where padding would be
100 = note: consider using `#[repr(packed)]` to remove padding
101 help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()`
102 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
103 --> src/util/macro_util.rs:64:0
104 = help: see issue #48214
105 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
106 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
107 |
108 9 + #![feature(trivial_bounds)]
109 |
110
111 error[E0587]: type has conflicting packed and align representation hints
112 --> $DIR/union.rs:97:1
113 |
114 97 | union Unaligned3 {
115 | ^^^^^^^^^^^^^^^^
116
117 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
118 --> $DIR/union.rs:130:1
119 |
120 130 | union Unaligned7 {
121 | ^^^^^^^^^^^^^^^^
122 |
123 note: `AU16` has a `#[repr(align)]` attribute
124 --> $DIR/../include.rs:64:5
125 |
126 64 | pub struct AU16(pub u16);
127 | ^^^^^^^^^^^^^^^
128
129 error: aborting due to 13 previous errors
130
131 Some errors have detailed explanations: E0277, E0587, E0588.
132 For more information about an error, try `rustc --explain E0277`.