mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-30 16:43:41 +00:00
Rename MaybeUninit::drop to assume_init_drop.
This commit is contained in:
parent
caef83282b
commit
656a17b44d
@ -589,7 +589,7 @@ impl<T> MaybeUninit<T> {
|
||||
///
|
||||
/// [`assume_init`]: MaybeUninit::assume_init
|
||||
#[unstable(feature = "maybe_uninit_extra", issue = "63567")]
|
||||
pub unsafe fn drop(&mut self) {
|
||||
pub unsafe fn assume_init_drop(&mut self) {
|
||||
// SAFETY: the caller must guarantee that `self` is initialized.
|
||||
// Dropping the value in place is safe if that is the case.
|
||||
unsafe { ptr::drop_in_place(self.as_mut_ptr()) }
|
||||
|
Loading…
Reference in New Issue
Block a user