Deprecate `Rc::into_raw_non_null` and `Arc::into_raw_non_null`
This commit is contained in:
parent
cdb6bef4fb
commit
b359fe1eea
|
@ -636,6 +636,7 @@ impl<T: ?Sized> Rc<T> {
|
|||
///
|
||||
/// ```
|
||||
/// #![feature(rc_into_raw_non_null)]
|
||||
/// #![allow(deprecated)]
|
||||
///
|
||||
/// use std::rc::Rc;
|
||||
///
|
||||
|
@ -645,6 +646,7 @@ impl<T: ?Sized> Rc<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")]
|
||||
#[inline]
|
||||
pub fn into_raw_non_null(this: Self) -> NonNull<T> {
|
||||
// safe because Rc guarantees its pointer is non-null
|
||||
|
|
|
@ -635,6 +635,7 @@ impl<T: ?Sized> Arc<T> {
|
|||
///
|
||||
/// ```
|
||||
/// #![feature(rc_into_raw_non_null)]
|
||||
/// #![allow(deprecated)]
|
||||
///
|
||||
/// use std::sync::Arc;
|
||||
///
|
||||
|
@ -644,6 +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")]
|
||||
#[inline]
|
||||
pub fn into_raw_non_null(this: Self) -> NonNull<T> {
|
||||
// safe because Arc guarantees its pointer is non-null
|
||||
|
|
Loading…
Reference in New Issue