about summary refs log tree commit diff
path: root/library/alloc
diff options
context:
space:
mode:
authorfee1-dead <ent3rm4n@gmail.com>2022-12-28 15:51:39 +0800
committerGitHub <noreply@github.com>2022-12-28 15:51:39 +0800
commit58233e90b8e4f2712b0155f437cbad8d1bc6c58e (patch)
treee319f88fdaf77fb35d4b9fb565232bc7de0d28d3 /library/alloc
parentd1193ad1e6f05271b442a96d6ea7de18b66163a0 (diff)
parent3b8b0ac62ad2a8f828763350a37dfd5e14db171e (diff)
downloadrust-58233e90b8e4f2712b0155f437cbad8d1bc6c58e.tar.gz
rust-58233e90b8e4f2712b0155f437cbad8d1bc6c58e.zip
Rollup merge of #104024 - noeddl:unused-must-use, r=compiler-errors
Fix `unused_must_use` warning for `Box::from_raw`
Diffstat (limited to 'library/alloc')
-rw-r--r--library/alloc/src/boxed.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/boxed.rs b/library/alloc/src/boxed.rs
index b154688fb08..b5fe8d72f7d 100644
--- a/library/alloc/src/boxed.rs
+++ b/library/alloc/src/boxed.rs
@@ -954,7 +954,7 @@ impl<T: ?Sized> Box<T> {
     /// [`Layout`]: crate::Layout
     #[stable(feature = "box_raw", since = "1.4.0")]
     #[inline]
-    #[must_use = "call `drop(from_raw(ptr))` if you intend to drop the `Box`"]
+    #[must_use = "call `drop(Box::from_raw(ptr))` if you intend to drop the `Box`"]
     pub unsafe fn from_raw(raw: *mut T) -> Self {
         unsafe { Self::from_raw_in(raw, Global) }
     }