From de2eba18263855871522cb967bfa82ac1ef22d5e Mon Sep 17 00:00:00 2001 From: "Tim (Theemathas) Chirananthavat" Date: Sat, 21 Sep 2024 12:38:38 +0700 Subject: [PATCH] Reword ManuallyDrop+Box interaction --- library/core/src/mem/manually_drop.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/core/src/mem/manually_drop.rs b/library/core/src/mem/manually_drop.rs index 8dea3539e4639..86eac7724cf3a 100644 --- a/library/core/src/mem/manually_drop.rs +++ b/library/core/src/mem/manually_drop.rs @@ -41,8 +41,9 @@ use crate::ptr; /// /// # Interaction with `Box` /// -/// Currently, once the `Box` inside a `ManuallyDrop>` is dropped, -/// moving the `ManuallyDrop>` is [considered to be undefined +/// Currently, if you have a `ManuallyDrop`, where the type `T` is a `Box` or +/// contains a `Box` inside, then dropping the `T` followed by moving the +/// `ManuallyDrop` is [considered to be undefined /// behavior](https://github.com/rust-lang/unsafe-code-guidelines/issues/245). /// That is, the following code causes undefined behavior: ///