Skip to content

Commit 2119a21

Browse files
committed
Fix unused_must_use warning for Box::from_raw
1 parent 0f403da commit 2119a21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alloc/src/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ impl<T: ?Sized> Box<T> {
952952
/// [`Layout`]: crate::Layout
953953
#[stable(feature = "box_raw", since = "1.4.0")]
954954
#[inline]
955-
#[must_use = "call `drop(from_raw(ptr))` if you intend to drop the `Box`"]
955+
#[must_use = "call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`"]
956956
pub unsafe fn from_raw(raw: *mut T) -> Self {
957957
unsafe { Self::from_raw_in(raw, Global) }
958958
}

0 commit comments

Comments
 (0)