From 9b0094eda7a36e1b92d74e39f374850bcbeb457a Mon Sep 17 00:00:00 2001 From: Yilin Chen <1479826151@qq.com> Date: Sun, 5 Jul 2026 16:46:06 +0800 Subject: [PATCH] Add supplementary information for as_uninit_mut --- library/core/src/ptr/mut_ptr.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index b333f8217b2c0..b135ab6175783 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -638,6 +638,8 @@ impl *mut T { /// /// When calling this method, you have to ensure that *either* the pointer is null *or* /// the pointer is [convertible to a reference](crate::ptr#pointer-to-reference-conversion). + /// Note that because the created reference is to `MaybeUninit`, the + /// source pointer can point to uninitialized memory. /// /// # Panics during const evaluation ///