@@ -162,6 +162,36 @@ For more information about the cfg attribute, read:
162
162
https://doc.rust-lang.org/reference.html#conditional-compilation
163
163
"## ,
164
164
165
+ E0552 : r##"
166
+ A unrecognized representation attribute was used.
167
+
168
+ Erroneous code example:
169
+
170
+ ```compile_fail,E0552
171
+ #[repr(D)] // error: unrecognized representation hint
172
+ struct MyStruct {
173
+ my_field: usize
174
+ }
175
+ ```
176
+
177
+ You can use a `repr` attribute to tell the compiler how you want a struct or
178
+ enum to be laid out in memory.
179
+
180
+ Make sure you're using one of the supported options:
181
+
182
+ ```
183
+ #[repr(C)] // ok!
184
+ struct MyStruct {
185
+ my_field: usize
186
+ }
187
+ ```
188
+
189
+ For more information about specifying representations, see the ["Alternative
190
+ Representations" section] of the Rustonomicon.
191
+
192
+ ["Alternative Representations" section]: https://doc.rust-lang.org/nomicon/other-reprs.html
193
+ "## ,
194
+
165
195
E0554 : r##"
166
196
Feature attributes are only allowed on the nightly release channel. Stable or
167
197
beta compilers will not comply.
@@ -315,7 +345,6 @@ register_diagnostics! {
315
345
E0549 , // rustc_deprecated attribute must be paired with either stable or unstable attribute
316
346
E0550 , // multiple deprecated attributes
317
347
E0551 , // incorrect meta item
318
- E0552 , // unrecognized representation hint
319
348
E0555 , // malformed feature attribute, expected #![feature(...)]
320
349
E0556 , // malformed feature, expected just one word
321
350
E0557 , // feature has been removed
0 commit comments