diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-05-14 18:43:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-14 18:43:40 +0200 |
| commit | 8395461fa435d8e1c6b61ff1d5be390fbd9aec23 (patch) | |
| tree | eda8e2356926dc5f9f2c24b8da3d084f8eaba1b7 | |
| parent | a1b5841bcc1c13e92ab030ead0e95e1d876accd5 (diff) | |
| parent | c610177558bc62c40bacc105c7eb4130ea66db72 (diff) | |
| download | rust-8395461fa435d8e1c6b61ff1d5be390fbd9aec23.tar.gz rust-8395461fa435d8e1c6b61ff1d5be390fbd9aec23.zip | |
Rollup merge of #140988 - mathisbot:docfix_maybeuninit_write, r=tgross35
MaybeUninit::write: fix doc # Fix doc for `MaybeUninit::write` The documentation refers to the way `MaybeUninit` stores data internally. The property of not dropping content on context exit is the responsibility of `ManuallyDrop`.
| -rw-r--r-- | library/core/src/mem/maybe_uninit.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index d0be82adb6b..63a479ed8dd 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -391,7 +391,7 @@ impl<T> MaybeUninit<T> { /// For your convenience, this also returns a mutable reference to the /// (now safely initialized) contents of `self`. /// - /// As the content is stored inside a `MaybeUninit`, the destructor is not + /// As the content is stored inside a `ManuallyDrop`, the destructor is not /// run for the inner data if the MaybeUninit leaves scope without a call to /// [`assume_init`], [`assume_init_drop`], or similar. Code that receives /// the mutable reference returned by this function needs to keep this in |
