Apply a suggestion

Co-authored-by: Eric Huss <eric@huss.org>
pull/376/head
Yuki Okushi 2 years ago committed by GitHub
parent 341005b559
commit 7df62756a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,8 +56,7 @@ compiled as normal.)
## repr(transparent) ## repr(transparent)
This can only be used on structs with a single non-zero-sized field `#[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).
or enums with only one non-zero-sized field (there may be additional zero-sized fields).
The effect is that the layout and ABI of the whole struct/enum is guaranteed to be the same as that one field. The effect is that the layout and ABI of the whole struct/enum is guaranteed to be the same as that one field.
> NOTE: There's a `transparent_unions` nightly feature to apply `repr(transparent)` to unions, > NOTE: There's a `transparent_unions` nightly feature to apply `repr(transparent)` to unions,

Loading…
Cancel
Save