about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorBryan Donlan <bdonlan@amazon.com>2019-10-24 20:09:35 +0000
committerBryan Donlan <bdonlan@amazon.com>2019-11-21 18:33:03 +0000
commit91ee3d1c31e5d1684e0d2ec5036dc69993b6f992 (patch)
tree875dd2c18ad2daec88cb21d42f8ee74a549323db /src/liballoc
parent35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed (diff)
downloadrust-91ee3d1c31e5d1684e0d2ec5036dc69993b6f992.tar.gz
rust-91ee3d1c31e5d1684e0d2ec5036dc69993b6f992.zip
Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}`
Closes: #57977
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/rc.rs4
-rw-r--r--src/liballoc/sync.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs
index a11f9e8c145..12f86bf880f 100644
--- a/src/liballoc/rc.rs
+++ b/src/liballoc/rc.rs
@@ -1803,7 +1803,7 @@ impl<T: ?Sized> Weak<T> {
     /// If `self` was created using [`Weak::new`], this will return 0.
     ///
     /// [`Weak::new`]: #method.new
-    #[unstable(feature = "weak_counts", issue = "57977")]
+    #[stable(feature = "weak_counts", since = "1.40.0")]
     pub fn strong_count(&self) -> usize {
         if let Some(inner) = self.inner() {
             inner.strong()
@@ -1819,7 +1819,7 @@ impl<T: ?Sized> Weak<T> {
     /// allocation.
     ///
     /// [`Weak::new`]: #method.new
-    #[unstable(feature = "weak_counts", issue = "57977")]
+    #[stable(feature = "weak_counts", since = "1.40.0")]
     pub fn weak_count(&self) -> Option<usize> {
         self.inner().map(|inner| {
             if inner.strong() > 0 {
diff --git a/src/liballoc/sync.rs b/src/liballoc/sync.rs
index 4b10f089c29..3f86dfb469e 100644
--- a/src/liballoc/sync.rs
+++ b/src/liballoc/sync.rs
@@ -1496,7 +1496,7 @@ impl<T: ?Sized> Weak<T> {
     /// If `self` was created using [`Weak::new`], this will return 0.
     ///
     /// [`Weak::new`]: #method.new
-    #[unstable(feature = "weak_counts", issue = "57977")]
+    #[stable(feature = "weak_counts", since = "1.40.0")]
     pub fn strong_count(&self) -> usize {
         if let Some(inner) = self.inner() {
             inner.strong.load(SeqCst)
@@ -1519,7 +1519,7 @@ impl<T: ?Sized> Weak<T> {
     /// `Weak`s pointing to the same allocation.
     ///
     /// [`Weak::new`]: #method.new
-    #[unstable(feature = "weak_counts", issue = "57977")]
+    #[stable(feature = "weak_counts", since = "1.40.0")]
     pub fn weak_count(&self) -> Option<usize> {
         // Due to the implicit weak pointer added when any strong pointers are
         // around, we cannot implement `weak_count` correctly since it