Skip to content

Commit a276831

Browse files
authored
Unrolled build for rust-lang#140988
Rollup merge of rust-lang#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`.
2 parents 2a5da7a + c610177 commit a276831

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/mem/maybe_uninit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ impl<T> MaybeUninit<T> {
391391
/// For your convenience, this also returns a mutable reference to the
392392
/// (now safely initialized) contents of `self`.
393393
///
394-
/// As the content is stored inside a `MaybeUninit`, the destructor is not
394+
/// As the content is stored inside a `ManuallyDrop`, the destructor is not
395395
/// run for the inner data if the MaybeUninit leaves scope without a call to
396396
/// [`assume_init`], [`assume_init_drop`], or similar. Code that receives
397397
/// the mutable reference returned by this function needs to keep this in

0 commit comments

Comments
 (0)