File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -585,12 +585,11 @@ was wrapped in a newtype `struct` with the same `align` modifier.
585585
586586The `transparent ` representation can only be used on a [`struct `][structs ]
587587or an [`enum `][enumerations ] with a single variant that has :
588-
589- - a single field with non - zero size , and
590- - any number of fields with size 0 and alignment 1 (e . g. [`PhantomData <T >`]).
588+ - any number of fields with size 0 and alignment 1 (e . g. [`PhantomData <T >`]), and
589+ - at most one other field .
591590
592591Structs and enums with this representation have the same layout and ABI
593- as the single non - zero sized field .
592+ as the only non - size 0 non - alignment 1 field , if present , or unit otherwise .
594593
595594This is different than the `C ` representation because
596595a struct with the `C ` representation will always have the ABI of a `C ` `struct `
You can’t perform that action at this time.
0 commit comments