blob: c7bd1806268afa03b009888ed2f7f65daeedff2d [file] [view]
#### Note: this error code is no longer emitted by the compiler.
This error code was replaced by `E0539`.
A unrecognized representation attribute was used.
Erroneous code example:
```compile_fail
#[repr(D)] // error: unrecognized representation hint
struct MyStruct {
my_field: usize
}
```
You can use a `repr` attribute to tell the compiler how you want a struct or
enum to be laid out in memory.
Make sure you're using one of the supported options:
```
#[repr(C)] // ok!
struct MyStruct {
my_field: usize
}
```
For more information about specifying representations, see the ["Alternative
Representations" section] of the Rustonomicon.
["Alternative Representations" section]: https://doc.rust-lang.org/nomicon/other-reprs.html