From 6d35f8475f71921e089465558bc40adbe449b25c Mon Sep 17 00:00:00 2001 From: DPC Date: Mon, 31 Aug 2020 02:27:38 +0200 Subject: [PATCH] fix --- library/core/src/mem/maybe_uninit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); } /// } /// ``` ///