A unrecognized representation attribute was used.
Erroneous code example:
#![allow(unused)]
fn main() {
#[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:
#![allow(unused)]
fn main() {
#[repr(C)] // ok!
struct MyStruct {
my_field: usize
}
} For more information about specifying representations, see the "Alternative Representations" section of the Rustonomicon.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0552.html