Bump Weak::strong_count/weak_count stabilizations from 1.40 to 1.41

This commit is contained in:
David Tolnay 2019-12-14 19:26:25 -08:00
parent 0d0b283c2c
commit 9778e03665
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
2 changed files with 4 additions and 4 deletions

View file

@ -1803,7 +1803,7 @@ impl<T: ?Sized> Weak<T> {
/// If `self` was created using [`Weak::new`], this will return 0.
///
/// [`Weak::new`]: #method.new
#[stable(feature = "weak_counts", since = "1.40.0")]
#[stable(feature = "weak_counts", since = "1.41.0")]
pub fn strong_count(&self) -> usize {
if let Some(inner) = self.inner() {
inner.strong()
@ -1815,7 +1815,7 @@ impl<T: ?Sized> Weak<T> {
/// Gets the number of `Weak` pointers pointing to this allocation.
///
/// If no strong pointers remain, this will return zero.
#[stable(feature = "weak_counts", since = "1.40.0")]
#[stable(feature = "weak_counts", since = "1.41.0")]
pub fn weak_count(&self) -> usize {
self.inner().map(|inner| {
if inner.strong() > 0 {

View file

@ -1496,7 +1496,7 @@ impl<T: ?Sized> Weak<T> {
/// If `self` was created using [`Weak::new`], this will return 0.
///
/// [`Weak::new`]: #method.new
#[stable(feature = "weak_counts", since = "1.40.0")]
#[stable(feature = "weak_counts", since = "1.41.0")]
pub fn strong_count(&self) -> usize {
if let Some(inner) = self.inner() {
inner.strong.load(SeqCst)
@ -1518,7 +1518,7 @@ impl<T: ?Sized> Weak<T> {
/// `Weak`s pointing to the same allocation.
///
/// [`Weak::new`]: #method.new
#[stable(feature = "weak_counts", since = "1.40.0")]
#[stable(feature = "weak_counts", since = "1.41.0")]
pub fn weak_count(&self) -> usize {
self.inner().map(|inner| {
let weak = inner.weak.load(SeqCst);