Skip to content

Commit 12b491a

Browse files
committed
Remove out-of-context comment in mem::MaybeUninit documentation
1 parent d6cbdce commit 12b491a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/src/mem/maybe_uninit.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,8 @@ use crate::slice;
130130
/// MaybeUninit::uninit().assume_init()
131131
/// };
132132
///
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.
133+
/// // Dropping a `MaybeUninit` does nothing, so if there is a panic during this loop,
134+
/// // we have a memory leak, but there is no memory safety issue.
138135
/// for elem in &mut data[..] {
139136
/// elem.write(vec![42]);
140137
/// }

0 commit comments

Comments
 (0)