Skip to content

Commit 7df6275

Browse files
JohnTitorehuss
andauthored
Apply a suggestion
Co-authored-by: Eric Huss <[email protected]>
1 parent 341005b commit 7df6275

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/other-reprs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ compiled as normal.)
5656

5757
## repr(transparent)
5858

59-
This can only be used on structs with a single non-zero-sized field
60-
or enums with only one non-zero-sized field (there may be additional zero-sized fields).
59+
`#[repr(transparent)]` can only be used on a struct or single-variant enum that has a single non-zero-sized field (there may be additional zero-sized fields).
6160
The effect is that the layout and ABI of the whole struct/enum is guaranteed to be the same as that one field.
6261

6362
> NOTE: There's a `transparent_unions` nightly feature to apply `repr(transparent)` to unions,

0 commit comments

Comments
 (0)