From 1fb67363bfeb66a956297a81bc1c95c8aaee056a Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 29 Jul 2020 10:57:16 +0200 Subject: Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FCP: https://github.com/rust-lang/rust/issues/47336#issuecomment-619369613 --- library/alloc/src/sync.rs | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'library/alloc/src/sync.rs') diff --git a/library/alloc/src/sync.rs b/library/alloc/src/sync.rs index 8a5f1ee5076..906beba2a62 100644 --- a/library/alloc/src/sync.rs +++ b/library/alloc/src/sync.rs @@ -646,29 +646,6 @@ impl Arc { } } - /// Consumes the `Arc`, returning the wrapped pointer as `NonNull`. - /// - /// # Examples - /// - /// ``` - /// #![feature(rc_into_raw_non_null)] - /// #![allow(deprecated)] - /// - /// use std::sync::Arc; - /// - /// let x = Arc::new("hello".to_owned()); - /// let ptr = Arc::into_raw_non_null(x); - /// let deref = unsafe { ptr.as_ref() }; - /// assert_eq!(deref, "hello"); - /// ``` - #[unstable(feature = "rc_into_raw_non_null", issue = "47336")] - #[rustc_deprecated(since = "1.44.0", reason = "use `Arc::into_raw` instead")] - #[inline] - pub fn into_raw_non_null(this: Self) -> NonNull { - // safe because Arc guarantees its pointer is non-null - unsafe { NonNull::new_unchecked(Arc::into_raw(this) as *mut _) } - } - /// Creates a new [`Weak`][weak] pointer to this allocation. /// /// [weak]: struct.Weak.html -- cgit 1.4.1-3-g733a5