We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mem::MaybeUninit
1 parent d6cbdce commit 12b491aCopy full SHA for 12b491a
core/src/mem/maybe_uninit.rs
@@ -130,11 +130,8 @@ use crate::slice;
130
/// MaybeUninit::uninit().assume_init()
131
/// };
132
///
133
-/// // Dropping a `MaybeUninit` does nothing. Thus using raw pointer
134
-/// // assignment instead of `ptr::write` does not cause the old
135
-/// // uninitialized value to be dropped. Also if there is a panic during
136
-/// // this loop, we have a memory leak, but there is no memory safety
137
-/// // 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.
138
/// for elem in &mut data[..] {
139
/// elem.write(vec![42]);
140
/// }
0 commit comments