Debian Codegraph @

debian/rust-vendor/zerocopy-derive/tests/ui/union.stable.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:16
33 |
34 95 | #[repr(packed, align(2))]
35 | ^^^^^
36
37 error: this conflicts with another representation hint
38 --> $DIR/union.rs:104:18
39 |
40 104 | #[repr(align(1), align(2))]
41 | ^^^^^
42
43 error: this conflicts with another representation hint
44 --> $DIR/union.rs:112:18
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
88 error[E0277]: `IntoBytes2` has 1 total byte(s) of padding
89 --> $DIR/union.rs:44:10
90 |
91 44 | #[derive(IntoBytes)]
92 | ^^^^^^^^^ types with padding cannot implement `IntoBytes`
93 |
94 = note: consider using `zerocopy::Unalign` to lower the alignment of individual fields
95 = note: consider adding explicit fields where padding would be
96 = note: consider using `#[repr(packed)]` to remove padding
97 help: the trait `PaddingFree<IntoBytes2, 1>` is not implemented for `()`
98 but trait `PaddingFree<IntoBytes2, 0>` is implemented for it
99 --> $WORKSPACE/src/util/macro_util.rs:64:1
100 |
101 64 | impl<T: ?Sized> PaddingFree<T, 0> for () {}
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103 = help: see issue #48214
104 = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
105
106 error[E0587]: type has conflicting packed and align representation hints
107 --> $DIR/union.rs:97:1
108 |
109 97 | union Unaligned3 {
110 | ^^^^^^^^^^^^^^^^
111
112 error[E0588]: packed type cannot transitively contain a `#[repr(align)]` type
113 --> $DIR/union.rs:130:1
114 |
115 130 | union Unaligned7 {
116 | ^^^^^^^^^^^^^^^^
117 |
118 note: `AU16` has a `#[repr(align)]` attribute
119 --> $DIR/../include.rs:64:5
120 |
121 64 | pub struct AU16(pub u16);
122 | ^^^^^^^^^^^^^^^
123
124 error: aborting due to 13 previous errors
125
126 Some errors have detailed explanations: E0277, E0587, E0588.
127 For more information about an error, try `rustc --explain E0277`.