@@ -162,6 +162,63 @@ 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
+
195
+ E0554 : r##"
196
+ Feature attributes are only allowed on the nightly release channel. Stable or
197
+ beta compilers will not comply.
198
+
199
+ Example of erroneous code (on a stable compiler):
200
+
201
+ ```ignore (depends on release channel)
202
+ #![feature(non_ascii_idents)] // error: #![feature] may not be used on the
203
+ // stable release channel
204
+ ```
205
+
206
+ If you need the feature, make sure to use a nightly release of the compiler
207
+ (but be warned that the feature may be removed or altered in the future).
208
+ "## ,
209
+
210
+ E0557 : r##"
211
+ A feature attribute named a feature that has been removed.
212
+
213
+ Erroneous code example:
214
+
215
+ ```compile_fail,E0557
216
+ #![feature(managed_boxes)] // error: feature has been removed
217
+ ```
218
+
219
+ Delete the offending feature attribute.
220
+ "## ,
221
+
165
222
E0558 : r##"
166
223
The `export_name` attribute was malformed.
167
224
@@ -300,11 +357,8 @@ register_diagnostics! {
300
357
E0549 , // rustc_deprecated attribute must be paired with either stable or unstable attribute
301
358
E0550 , // multiple deprecated attributes
302
359
E0551 , // incorrect meta item
303
- E0552 , // unrecognized representation hint
304
- E0554 , // #[feature] may not be used on the [] release channel
305
360
E0555 , // malformed feature attribute, expected #![feature(...)]
306
361
E0556 , // malformed feature, expected just one word
307
- E0557 , // feature has been removed
308
362
E0584 , // file for module `..` found at both .. and ..
309
363
E0589 , // invalid `repr(align)` attribute
310
364
}
0 commit comments