diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2020-04-15 15:56:07 +0200 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2020-04-15 16:18:33 +0200 |
| commit | b359fe1eea3ce987f8d77e4418b834db4b1e5353 (patch) | |
| tree | 61fe3bf81c4ce9bdb9c05dd8e73f9774f2b712dd /src/liballoc | |
| parent | cdb6bef4fbaf114e3d8546bf0bb213471a8d0f7c (diff) | |
| download | rust-b359fe1eea3ce987f8d77e4418b834db4b1e5353.tar.gz rust-b359fe1eea3ce987f8d77e4418b834db4b1e5353.zip | |
Deprecate `Rc::into_raw_non_null` and `Arc::into_raw_non_null`
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/rc.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/sync.rs | 2 |
2 files changed, 4 insertions, 0 deletions
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<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 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<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 |
