Skip to content

Commit

Permalink
Reword ManuallyDrop+Box interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
theemathas committed Sep 21, 2024
1 parent f604ed6 commit de2eba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions library/core/src/mem/manually_drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ use crate::ptr;
///
/// # Interaction with `Box`
///
/// Currently, once the `Box<T>` inside a `ManuallyDrop<Box<T>>` is dropped,
/// moving the `ManuallyDrop<Box<T>>` is [considered to be undefined
/// Currently, if you have a `ManuallyDrop<T>`, where the type `T` is a `Box` or
/// contains a `Box` inside, then dropping the `T` followed by moving the
/// `ManuallyDrop<T>` is [considered to be undefined
/// behavior](https://github.com/rust-lang/unsafe-code-guidelines/issues/245).
/// That is, the following code causes undefined behavior:
///
Expand Down

0 comments on commit de2eba1

Please sign in to comment.