Add missing "unsafe" to fix doctest

This commit is contained in:
Patrick Walton 2022-11-17 21:08:52 -08:00 committed by Erik Desjardins
parent 2836e5541a
commit b2ef9f7223

View File

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