diff options
| author | Bryan Donlan <bdonlan@amazon.com> | 2019-10-24 20:09:35 +0000 |
|---|---|---|
| committer | Bryan Donlan <bdonlan@amazon.com> | 2019-11-21 18:33:03 +0000 |
| commit | 91ee3d1c31e5d1684e0d2ec5036dc69993b6f992 (patch) | |
| tree | 875dd2c18ad2daec88cb21d42f8ee74a549323db /src/liballoc/sync.rs | |
| parent | 35ef33a89dfd8ff8c8a7b3c58fa7136bbcb2f1ed (diff) | |
| download | rust-91ee3d1c31e5d1684e0d2ec5036dc69993b6f992.tar.gz rust-91ee3d1c31e5d1684e0d2ec5036dc69993b6f992.zip | |
Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}`
Closes: #57977
Diffstat (limited to 'src/liballoc/sync.rs')
| -rw-r--r-- | src/liballoc/sync.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
