diff --git a/library/core/src/mem/maybe_uninit.rs b/library/core/src/mem/maybe_uninit.rs index 421b16baa4ca..a615f49c6be8 100644 --- a/library/core/src/mem/maybe_uninit.rs +++ b/library/core/src/mem/maybe_uninit.rs @@ -167,7 +167,7 @@ use crate::mem::ManuallyDrop; /// /// // For each item in the array, drop if we allocated it. /// for elem in &mut data[0..data_len] { -/// unsafe { ptr::drop_in_place(elem.ptr()); } +/// unsafe { ptr::drop_in_place(elem.as_mut_ptr()); } /// } /// ``` ///