Error code E0693

align representation hint was incorrectly declared.

Erroneous code examples:

#[repr(align=8)] // error!
struct Align8(i8);

#[repr(align="8")] // error!
struct Align8(i8);
Run

This is a syntax error at the level of attribute declarations. The proper syntax for align representation hint is the following:

#[repr(align(8))] // ok!
struct Align8(i8);
Run

Back to list of error codes