diff options
| author | Josh Stone <jistone@redhat.com> | 2017-04-20 13:55:38 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2017-04-20 21:16:31 -0700 |
| commit | f4aaae9bdbca695d8d60feaa63cb09cf06598d50 (patch) | |
| tree | 20b25d15f61b176c569f25d78e53e1aab6f55180 /src/liballoc | |
| parent | df86cecdd2ca927110c48c97227a62d1d0c8f7ce (diff) | |
| download | rust-f4aaae9bdbca695d8d60feaa63cb09cf06598d50.tar.gz rust-f4aaae9bdbca695d8d60feaa63cb09cf06598d50.zip | |
Remove Rc::would_wrap
[unstable, deprecated since 1.15.0]
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/rc.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index fed718e9be4..dab6cf011bd 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -341,19 +341,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 |
