Update src/type-layout.md

Co-authored-by: Ralf Jung <post@ralfj.de>
This commit is contained in:
Joshua Liebow-Feeser 2023-08-21 13:43:26 -07:00 committed by GitHub
parent 2f82b7ff3b
commit 61c6349326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -64,9 +64,9 @@ a valid `u8`. A byte at any offset in a reference or pointer type may not be a
valid `u8` (the semantics of transmuting a reference or pointer to a non-pointer
type is currently undecided).
For the primitive numeric types and also for `bool` and `char`, every byte is
For `bool` and `char`, every byte is
guaranteed to be initialized (in other words, for every such type, `T`,
`transmute::<T, [u8; size_of::<T>()]>(...)` is always sound).
`transmute::<T, [u8; size_of::<T>()]>(...)` is always sound -- but the inverse is not).
## Pointers and References Layout