summaryrefslogtreecommitdiffstats
path: root/third_party/rust/zerocopy-derive/tests/ui-nightly/enum.stderr
blob: a4d5edf35ff22c68c27303e1ded393345f140836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
error: unrecognized representation hint
  --> tests/ui-nightly/enum.rs:19:8
   |
19 | #[repr("foo")]
   |        ^^^^^

error: unrecognized representation hint
  --> tests/ui-nightly/enum.rs:25:8
   |
25 | #[repr(foo)]
   |        ^^^

error: unsupported representation for deriving FromBytes, AsBytes, or Unaligned on an enum
  --> tests/ui-nightly/enum.rs:31:8
   |
31 | #[repr(transparent)]
   |        ^^^^^^^^^^^

error: conflicting representation hints
  --> tests/ui-nightly/enum.rs:37:8
   |
37 | #[repr(u8, u16)]
   |        ^^^^^^^

error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout
  --> tests/ui-nightly/enum.rs:42:22
   |
42 | #[derive(FromZeroes, FromBytes)]
   |                      ^^^^^^^^^
   |
   = note: this error originates in the derive macro `FromBytes` (in Nightly builds, run with -Z macro-backtrace for more info)

error: only C-like enums can implement FromZeroes
  --> tests/ui-nightly/enum.rs:52:1
   |
52 | / enum FromZeroes1 {
53 | |     A(u8),
54 | | }
   | |_^

error: only C-like enums can implement FromZeroes
  --> tests/ui-nightly/enum.rs:57:1
   |
57 | / enum FromZeroes2 {
58 | |     A,
59 | |     B(u8),
60 | | }
   | |_^

error: FromZeroes only supported on enums with a variant that has a discriminant of `0`
  --> tests/ui-nightly/enum.rs:63:1
   |
63 | / enum FromZeroes3 {
64 | |     A = 1,
65 | |     B,
66 | | }
   | |_^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
  --> tests/ui-nightly/enum.rs:73:8
   |
73 | #[repr(C)]
   |        ^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
  --> tests/ui-nightly/enum.rs:79:8
   |
79 | #[repr(usize)]
   |        ^^^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
  --> tests/ui-nightly/enum.rs:85:8
   |
85 | #[repr(isize)]
   |        ^^^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
  --> tests/ui-nightly/enum.rs:91:8
   |
91 | #[repr(u32)]
   |        ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
  --> tests/ui-nightly/enum.rs:97:8
   |
97 | #[repr(i32)]
   |        ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
   --> tests/ui-nightly/enum.rs:103:8
    |
103 | #[repr(u64)]
    |        ^^^

error: FromBytes requires repr of "u8", "u16", "i8", or "i16"
   --> tests/ui-nightly/enum.rs:109:8
    |
109 | #[repr(i64)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:119:8
    |
119 | #[repr(C)]
    |        ^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:125:8
    |
125 | #[repr(u16)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:131:8
    |
131 | #[repr(i16)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:137:8
    |
137 | #[repr(u32)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:143:8
    |
143 | #[repr(i32)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:149:8
    |
149 | #[repr(u64)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:155:8
    |
155 | #[repr(i64)]
    |        ^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:161:8
    |
161 | #[repr(usize)]
    |        ^^^^^

error: Unaligned requires repr of "u8" or "i8", and no alignment (i.e., repr(align(N > 1)))
   --> tests/ui-nightly/enum.rs:167:8
    |
167 | #[repr(isize)]
    |        ^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
   --> tests/ui-nightly/enum.rs:173:12
    |
173 | #[repr(u8, align(2))]
    |            ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
   --> tests/ui-nightly/enum.rs:179:12
    |
179 | #[repr(i8, align(2))]
    |            ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
   --> tests/ui-nightly/enum.rs:185:18
    |
185 | #[repr(align(1), align(2))]
    |                  ^^^^^^^^

error: cannot derive Unaligned with repr(align(N > 1))
   --> tests/ui-nightly/enum.rs:191:8
    |
191 | #[repr(align(2), align(4))]
    |        ^^^^^^^^

error[E0565]: meta item in `repr` must be an identifier
  --> tests/ui-nightly/enum.rs:19:8
   |
19 | #[repr("foo")]
   |        ^^^^^

error[E0552]: unrecognized representation hint
  --> tests/ui-nightly/enum.rs:25:8
   |
25 | #[repr(foo)]
   |        ^^^
   |
   = help: valid reprs are `Rust` (default), `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`

error[E0566]: conflicting representation hints
  --> tests/ui-nightly/enum.rs:37:8
   |
37 | #[repr(u8, u16)]
   |        ^^  ^^^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
   = note: `#[deny(conflicting_repr_hints)]` on by default