Remove out-of-context comment in mem::MaybeUninit
documentation
This commit is contained in:
parent
a785176741
commit
3d2b61c1af
@ -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]);
|
||||
/// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user