diff options
| author | bors <bors@rust-lang.org> | 2020-07-30 00:17:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-30 00:17:51 +0000 |
| commit | fb0b1237b12e949320ccd31a6741f03425fc9a66 (patch) | |
| tree | 3f49c7e7bb5e814d2a23ab73a105f4fc4a9f49fe /library/alloc/src/sync.rs | |
| parent | 6b269e44322cfca727fd0e793d3a60bd371cbcae (diff) | |
| parent | f4f77d756dd29872829b9b59f44a64c0a5e11c61 (diff) | |
| download | rust-fb0b1237b12e949320ccd31a6741f03425fc9a66.tar.gz rust-fb0b1237b12e949320ccd31a6741f03425fc9a66.zip | |
Auto merge of #74929 - Manishearth:rollup-z2vflrp, r=Manishearth
Rollup of 10 pull requests
Successful merges:
- #74742 (Remove links to rejected errata 4406 for RFC 4291)
- #74819 (Point towards `format_spec`; it is in other direction)
- #74852 (Explain why inlining default ToString impl)
- #74869 (Make closures and generators a must use types)
- #74873 (symbol mangling: use ty::print::Print for consts)
- #74902 (Remove deprecated unstable `{Box,Rc,Arc}::into_raw_non_null` functions)
- #74904 (Fix some typos in src/librustdoc/clean/auto_trait.rs)
- #74910 (fence docs: fix example Mutex)
- #74912 (Fix broken link in unstable book `plugin`)
- #74927 (Change the target data layout to specify more values)
Failed merges:
r? @ghost
Diffstat (limited to 'library/alloc/src/sync.rs')
| -rw-r--r-- | library/alloc/src/sync.rs | 23 |
1 files changed, 0 insertions, 23 deletions
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<T: ?Sized> Arc<T> { } } - /// Consumes the `Arc`, returning the wrapped pointer as `NonNull<T>`. - /// - /// # 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<T> { - // 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 |
