mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Guarantee that char
has the same size and alignment as u32
This commit is contained in:
parent
e1de04ad4e
commit
3fea7cc7da
@ -283,7 +283,7 @@ mod prim_never {}
|
||||
/// `char` type. For technical reasons, there is additional, separate
|
||||
/// documentation in [the `std::char` module](char/index.html) as well.
|
||||
///
|
||||
/// # Validity
|
||||
/// # Validity and Layout
|
||||
///
|
||||
/// A `char` is a '[Unicode scalar value]', which is any '[Unicode code point]'
|
||||
/// other than a [surrogate code point]. This has a fixed numerical definition:
|
||||
@ -330,6 +330,9 @@ mod prim_never {}
|
||||
/// ("noncharacters"); and some may be given different meanings by different
|
||||
/// users ("private use").
|
||||
///
|
||||
/// `char` is guaranteed to have the same size and alignment as `u32` on all
|
||||
/// platforms.
|
||||
///
|
||||
/// [Unicode code point]: https://www.unicode.org/glossary/#code_point
|
||||
/// [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value
|
||||
/// [non-exhaustive match]: ../book/ch06-02-match.html#matches-are-exhaustive
|
||||
|
Loading…
Reference in New Issue
Block a user