diff options
| author | Joshua Liebow-Feeser <joshlf@users.noreply.github.com> | 2023-10-25 08:26:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 08:26:07 -0700 |
| commit | c278bc1f8188a956dd94a1c173c46b70cb0b43a3 (patch) | |
| tree | 6f6a807d7f104477f35b0965885f03d51c74a6b0 | |
| parent | 3fea7cc7da6dadd2012af3f42f870e204470e479 (diff) | |
| download | rust-c278bc1f8188a956dd94a1c173c46b70cb0b43a3.tar.gz rust-c278bc1f8188a956dd94a1c173c46b70cb0b43a3.zip | |
Update library/core/src/primitive_docs.rs
Co-authored-by: scottmcm <scottmcm@users.noreply.github.com>
| -rw-r--r-- | library/core/src/primitive_docs.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/core/src/primitive_docs.rs b/library/core/src/primitive_docs.rs index 9914225367c..1adb3807171 100644 --- a/library/core/src/primitive_docs.rs +++ b/library/core/src/primitive_docs.rs @@ -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 |
