about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2017-04-20 13:55:38 -0700
committerJosh Stone <jistone@redhat.com>2017-04-20 21:16:31 -0700
commitf4aaae9bdbca695d8d60feaa63cb09cf06598d50 (patch)
tree20b25d15f61b176c569f25d78e53e1aab6f55180 /src
parentdf86cecdd2ca927110c48c97227a62d1d0c8f7ce (diff)
downloadrust-f4aaae9bdbca695d8d60feaa63cb09cf06598d50.tar.gz
rust-f4aaae9bdbca695d8d60feaa63cb09cf06598d50.zip
Remove Rc::would_wrap
[unstable, deprecated since 1.15.0]
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/SUMMARY.md1
-rw-r--r--src/doc/unstable-book/src/library-features/rc-would-unwrap.md5
-rw-r--r--src/liballoc/rc.rs13
3 files changed, 0 insertions, 19 deletions
diff --git a/src/doc/unstable-book/src/SUMMARY.md b/src/doc/unstable-book/src/SUMMARY.md
index 0d5aa4b5c42..cc03ac4d244 100644
--- a/src/doc/unstable-book/src/SUMMARY.md
+++ b/src/doc/unstable-book/src/SUMMARY.md
@@ -185,7 +185,6 @@
     - [rand](library-features/rand.md)
     - [range_contains](library-features/range-contains.md)
     - [raw](library-features/raw.md)
-    - [rc_would_unwrap](library-features/rc-would-unwrap.md)
     - [retain_hash_collection](library-features/retain-hash-collection.md)
     - [reverse_cmp_key](library-features/reverse-cmp-key.md)
     - [rt](library-features/rt.md)
diff --git a/src/doc/unstable-book/src/library-features/rc-would-unwrap.md b/src/doc/unstable-book/src/library-features/rc-would-unwrap.md
deleted file mode 100644
index 462387dfdcc..00000000000
--- a/src/doc/unstable-book/src/library-features/rc-would-unwrap.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# `rc_would_unwrap`
-
-The tracking issue for this feature is: [#28356]
-
-[#28356]: https://github.com/rust-lang/rust/issues/28356
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