Skip to content

Commit

Permalink
Remove out-of-context comment in mem::MaybeUninit documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thinety committed Aug 22, 2022
1 parent a785176 commit 3d2b61c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions library/core/src/mem/maybe_uninit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
/// }
Expand Down

0 comments on commit 3d2b61c

Please sign in to comment.