File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -524,6 +524,10 @@ assert_eq!(std::mem::size_of::<Enum16>(), 4);
524
524
The ` align ` and ` packed ` modifiers can be used to respectively raise or lower
525
525
the alignment of ` struct ` s and ` union ` s. ` packed ` may also alter the padding
526
526
between fields (although it will not alter the padding inside of any field).
527
+ On their own, ` align ` and ` packed ` do not provide guarantees about the order
528
+ of fields in the layout of a struct or the layout of an enum variant, although
529
+ they may be combined with representations (such as ` C ` ) which do provide such
530
+ guarantees.
527
531
528
532
The alignment is specified as an integer parameter in the form of
529
533
` #[repr(align(x))] ` or ` #[repr(packed(x))] ` . The alignment value must be a
You can’t perform that action at this time.
0 commit comments