diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 653b4573e2a..602f3b803f5 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -636,6 +636,7 @@ impl Rc { /// /// ``` /// #![feature(rc_into_raw_non_null)] + /// #![allow(deprecated)] /// /// use std::rc::Rc; /// @@ -645,6 +646,7 @@ impl Rc { /// 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 { // safe because Rc guarantees its pointer is non-null diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs index 59bc8686cf4..34372b18254 100644 --- a/src/liballoc/sync.rs +++ b/src/liballoc/sync.rs @@ -635,6 +635,7 @@ impl Arc { /// /// ``` /// #![feature(rc_into_raw_non_null)] + /// #![allow(deprecated)] /// /// use std::sync::Arc; /// @@ -644,6 +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")] #[inline] pub fn into_raw_non_null(this: Self) -> NonNull { // safe because Arc guarantees its pointer is non-null