S0139: invalid repr attribute argument
Generated from rellum-diagnostics/src/db.rs.
Explanation
#[repr] controls the representation used for a type layout. In this milestone, Rellum only accepts #[repr(C)]; other representation forms such as packed, align(N), and transparent are not supported yet.
Common causes
- using a repr argument other than C
- omitting the repr argument
- using a future representation form that the compiler does not implement yet
Canonical fixes
- use the supported C representation
Before:
#[repr(packed)]
type Header = { tag: Int }
After:
#[repr(C)]
type Header = { tag: Int }
- remove the attribute until another representation is supported
Code example
#[repr(packed)]
type Header = { tag: Int }