Update library/core/src/primitive_docs.rs

Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
This commit is contained in:
Joshua Liebow-Feeser 2023-10-25 08:26:07 -07:00 committed by GitHub
parent 3fea7cc7da
commit c278bc1f81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -332,6 +332,10 @@ mod prim_never {}
///
/// `char` is guaranteed to have the same size and alignment as `u32` on all
/// platforms.
/// ```
/// use std::alloc::Layout;
/// assert_eq!(Layout::new::<char>(), Layout::new::<u32>());
/// ```
///
/// [Unicode code point]: https://www.unicode.org/glossary/#code_point
/// [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value