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` ... /// }