diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 567fd625582..1195805e6ea 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -481,7 +481,7 @@ impl Box { #[unstable( feature = "ptr_internals", issue = "none", - reason = "use `Box::leak(b).into()` or `NonNull::from(Box::leak(b))` instead" + reason = "use `Box::leak(b).into()` or `Unique::from(Box::leak(b))` instead" )] #[inline] #[doc(hidden)] diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index 34372b18254..c05af4c7e51 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -645,7 +645,7 @@ impl Arc { /// assert_eq!(deref, "hello"); /// ``` #[unstable(feature = "rc_into_raw_non_null", issue = "47336")] - #[rustc_deprecated(since = "1.44.0", reason = "use `Rc::into_raw` instead")] + #[rustc_deprecated(since = "1.44.0", reason = "use `Arc::into_raw` instead")] #[inline] pub fn into_raw_non_null(this: Self) -> NonNull { // safe because Arc guarantees its pointer is non-null