Skip to content

Commit d098f90

Browse files
authored
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
Fix `unused_must_use` warning for `Box::from_raw`
2 parents 64c229c + 2119a21 commit d098f90

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
@@ -954,7 +954,7 @@ impl<T: ?Sized> Box<T> {
954954
/// [`Layout`]: crate::Layout
955955
#[stable(feature = "box_raw", since = "1.4.0")]
956956
#[inline]
957-
#[must_use = "call `drop(from_raw(ptr))` if you intend to drop the `Box`"]
957+
#[must_use = "call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`"]
958958
pub unsafe fn from_raw(raw: *mut T) -> Self {
959959
unsafe { Self::from_raw_in(raw, Global) }
960960
}

0 commit comments

Comments
 (0)