diff options
| author | bors <bors@rust-lang.org> | 2017-04-23 02:13:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-04-23 02:13:55 +0000 |
| commit | a94124488ae0dba1a8a4552a4724cddf9d266e2f (patch) | |
| tree | 01ae0509c80cc36afc8b22e1ec618178b080ed29 /src/liballoc | |
| parent | 252d3da8a6c715ccafcf77d83b826f6fb899cfe5 (diff) | |
| parent | 13d2534fd3040520622a2b2a262ed9e7079c9fd8 (diff) | |
| download | rust-a94124488ae0dba1a8a4552a4724cddf9d266e2f.tar.gz rust-a94124488ae0dba1a8a4552a4724cddf9d266e2f.zip | |
Auto merge of #41437 - cuviper:remove-unstable-deprecated, r=alexcrichton
Remove items that are unstable and deprecated
This removes unstable items that have been deprecated for more than one cycle.
- Since 1.16.0, `#![feature(enumset)]`
- All of `mod collections::enum_set`
- Since 1.15.0, `#![feature(borrow_state)]`
- `cell::BorrowState`
- `RefCell::borrow_state()`
- Since 1.15.0, `#![feature(is_unique)]`
- `Rc::is_unique()` (made private like `Arc::is_unique()`)
- Since 1.15.0, `#![feature(rc_would_unwrap)]`
- `Rc::would_wrap()`
- Since 1.13.0, `#![feature(binary_heap_extras)]`
- `BinaryHeap::push_pop()`
- `BinaryHeap::replace()`
- Since 1.12.0, `#![feature(as_unsafe_cell)]`
- `Cell::as_unsafe_cell()`
- `RefCell::as_unsafe_cell()`
- Since 1.12.0, `#![feature(map_entry_recover_keys)]`
- `btree_map::OccupiedEntry::remove_pair()`
- `hash_map::OccupiedEntry::remove_pair()`
- Since 1.11.0, `#![feature(float_extras)]`
- `Float::nan()`
- `Float::infinity()`
- `Float::neg_infinity()`
- `Float::neg_zero()`
- `Float::zero()`
- `Float::one()`
- `Float::integer_decode()`
- `f32::integer_decode()`
- `f32::ldexp()`
- `f32::frexp()`
- `f32::next_after()`
- `f64::integer_decode()`
- `f64::ldexp()`
- `f64::frexp()`
- `f64::next_after()`
- Since 1.11.0, `#![feature(zero_one)]`
- `num::Zero`
- `num::One`
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/rc.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 69e5351cad5..38dc9145835 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -340,19 +340,6 @@ impl<T> Rc<T> { } } - /// Checks whether [`Rc::try_unwrap`][try_unwrap] would return - /// [`Ok`]. - /// - /// [try_unwrap]: struct.Rc.html#method.try_unwrap - /// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok - #[unstable(feature = "rc_would_unwrap", - reason = "just added for niche usecase", - issue = "28356")] - #[rustc_deprecated(since = "1.15.0", reason = "too niche; use `strong_count` instead")] - pub fn would_unwrap(this: &Self) -> bool { - Rc::strong_count(&this) == 1 - } - /// Consumes the `Rc`, returning the wrapped pointer. /// /// To avoid a memory leak the pointer must be converted back to an `Rc` using @@ -532,11 +519,7 @@ impl<T: ?Sized> Rc<T> { /// /// [weak]: struct.Weak.html #[inline] - #[unstable(feature = "is_unique", reason = "uniqueness has unclear meaning", - issue = "28356")] - #[rustc_deprecated(since = "1.15.0", - reason = "too niche; use `strong_count` and `weak_count` instead")] - pub fn is_unique(this: &Self) -> bool { + fn is_unique(this: &Self) -> bool { Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1 } |
