about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThiago Trannin <51510921+thinety@users.noreply.github.com>2022-08-22 20:03:53 -0300
committerThiago Trannin <51510921+thinety@users.noreply.github.com>2022-08-22 20:03:53 -0300
commit3d2b61c1af3442b24786e8152af75ae7cfdeae6a (patch)
tree137b983c9f99a90a5a9935cab3b9a09602a1d24e
parenta7851767419e56280110fe2859bbc15d5cbdd468 (diff)
downloadrust-3d2b61c1af3442b24786e8152af75ae7cfdeae6a.tar.gz
rust-3d2b61c1af3442b24786e8152af75ae7cfdeae6a.zip
Remove out-of-context comment in `mem::MaybeUninit` documentation
-rw-r--r--library/core/src/mem/maybe_uninit.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs
index b4ea5360833..997494c769e 100644
--- a/library/core/src/mem/maybe_uninit.rs
+++ b/library/core/src/mem/maybe_uninit.rs
@@ -130,11 +130,8 @@ use crate::slice;
 ///         MaybeUninit::uninit().assume_init()
 ///     };
 ///
-///     // Dropping a `MaybeUninit` does nothing. Thus using raw pointer
-///     // assignment instead of `ptr::write` does not cause the old
-///     // uninitialized value to be dropped. Also if there is a panic during
-///     // this loop, we have a memory leak, but there is no memory safety
-///     // issue.
+///     // Dropping a `MaybeUninit` does nothing, so if there is a panic during this loop,
+///     // we have a memory leak, but there is no memory safety issue.
 ///     for elem in &mut data[..] {
 ///         elem.write(vec![42]);
 ///     }