Skip to content

Commit

Permalink
Guarantee that char has the same size and alignment as u32
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlf authored Oct 18, 2023
1 parent e1de04a commit 3fea7cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/core/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3fea7cc

Please sign in to comment.