We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ec979de + 192178f commit 8947db0Copy full SHA for 8947db0
src/types/textual.md
@@ -17,7 +17,9 @@ is valid UTF-8. Calling a `str` method with a non-UTF-8 buffer can cause
17
Since `str` is a [dynamically sized type], it can only be instantiated through a
18
pointer type, such as `&str`.
19
20
-## Bit validity
+## Layout and bit validity
21
+
22
+`char` is guaranteed to have the same size and alignment as `u32` on all platforms.
23
24
Every byte of a `char` is guaranteed to be initialized (in other words,
25
`transmute::<char, [u8; size_of::<char>()]>(...)` is always sound -- but since
0 commit comments