File tree 1 file changed +3
-4
lines changed
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.
585
585
586
586
The `transparent ` representation can only be used on a [`struct `][structs ]
587
587
or 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 .
591
590
592
591
Structs 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 .
594
593
595
594
This is different than the `C ` representation because
596
595
a 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