We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#[must_use]
Box::from_raw
1 parent 6e81408 commit 023f102Copy full SHA for 023f102
alloc/src/boxed.rs
@@ -949,6 +949,7 @@ impl<T: ?Sized> Box<T> {
949
/// [`Layout`]: crate::Layout
950
#[stable(feature = "box_raw", since = "1.4.0")]
951
#[inline]
952
+ #[must_use = "call `drop(from_raw(ptr))` if you intend to drop the `Box`"]
953
pub unsafe fn from_raw(raw: *mut T) -> Self {
954
unsafe { Self::from_raw_in(raw, Global) }
955
}
0 commit comments