From b2ef9f72233d9bc88cbdd5533b12079e87cbf0c5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 17 Nov 2022 21:08:52 -0800 Subject: [PATCH] Add missing "unsafe" to fix doctest --- library/core/src/ptr/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index 7245feed672..6b96c6929a6 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -442,7 +442,7 @@ mod mut_ptr; /// /// ``` /// # struct Foo { x: i32 } -/// fn drop_in_place(to_drop: *mut Foo) { +/// unsafe fn drop_in_place(to_drop: *mut Foo) { /// let mut value = &mut *to_drop; /// // ... drop the fields of `value` ... /// }