]> git.lizzy.rs Git - rust.git/commitdiff
Apply suggestions from code review
authorSimon Sapin <simon.sapin@exyr.org>
Wed, 15 Apr 2020 16:32:56 +0000 (18:32 +0200)
committerGitHub <noreply@github.com>
Wed, 15 Apr 2020 16:32:56 +0000 (18:32 +0200)
Co-Authored-By: Ralf Jung <post@ralfj.de>
src/liballoc/boxed.rs
src/liballoc/sync.rs

index 567fd625582b9e570d426635a4cf8c6c260b9283..1195805e6ea46fdaf5ec5992b1b6538b6fefcbdf 100644 (file)
@@ -481,7 +481,7 @@ pub fn into_raw_non_null(b: Box<T>) -> NonNull<T> {
     #[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)]
index 34372b18254acd37e8a448ad3d4950af16c044b5..c05af4c7e5179e599b4b337b2ea2034c10f5cb89 100644 (file)
@@ -645,7 +645,7 @@ pub unsafe fn from_raw(ptr: *const T) -> Self {
     /// 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<T> {
         // safe because Arc guarantees its pointer is non-null