diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs index 60758551cc048..420b1e87642e1 100644 --- a/library/alloc/src/boxed.rs +++ b/library/alloc/src/boxed.rs @@ -1319,7 +1319,9 @@ impl Box { pub unsafe fn from_non_null(ptr: NonNull) -> Self { unsafe { Self::from_raw(ptr.as_ptr()) } } +} +impl Box { /// Consumes the `Box`, returning a wrapped raw pointer. /// /// The pointer will be properly aligned and non-null.