From c278bc1f8188a956dd94a1c173c46b70cb0b43a3 Mon Sep 17 00:00:00 2001 From: Joshua Liebow-Feeser Date: Wed, 25 Oct 2023 08:26:07 -0700 Subject: [PATCH] Update library/core/src/primitive_docs.rs Co-authored-by: scottmcm --- library/core/src/primitive_docs.rs | 4 ++++ 1 file changed, 4 insertions(+) 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::(), Layout::new::()); +/// ``` /// /// [Unicode code point]: https://www.unicode.org/glossary/#code_point /// [Unicode scalar value]: https://www.unicode.org/glossary/#unicode_scalar_value