Apply suggestions from code review

Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
Simon Sapin 2020-04-15 18:32:56 +02:00 committed by GitHub
parent b359fe1eea
commit 9a1c7dba32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -481,7 +481,7 @@ impl<T: ?Sized> Box<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)]

View File

@ -645,7 +645,7 @@ impl<T: ?Sized> Arc<T> {
/// 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