Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 425 Bytes

File metadata and controls

20 lines (15 loc) · 425 Bytes

A type has conflicting packed representation hints.

Erroneous code examples:

#[repr(packed, packed(2))] // error!
struct Company(i32);

#[repr(packed(2))] // error!
#[repr(packed)]
struct Company(i32);

You cannot use conflicting packed hints on a same type. If you want to pack a type to a given size, you should provide a size to packed:

#[repr(packed)] // ok!
struct Company(i32);