Error code E0566

Conflicting representation hints have been used on a same item.

Erroneous code example:

#[repr(u32, u64)]
enum Repr { A }
Run

In most cases (if not all), using just one representation hint is more than enough. If you want to have a representation hint depending on the current architecture, use cfg_attr. Example:

#[cfg_attr(linux, repr(u32))]
#[cfg_attr(not(linux), repr(u64))]
enum Repr { A }
Run

Back to list of error codes