mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Add tracking issue to unstable attribute
This commit is contained in:
parent
b664341d91
commit
0d314f08af
@ -1289,7 +1289,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 = "0")]
|
||||
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||
pub fn strong_count(&self) -> usize {
|
||||
if let Some(inner) = self.inner() {
|
||||
inner.strong()
|
||||
@ -1305,7 +1305,7 @@ impl<T: ?Sized> Weak<T> {
|
||||
/// value.
|
||||
///
|
||||
/// [`Weak::new`]: #method.new
|
||||
#[unstable(feature = "weak_counts", issue = "0")]
|
||||
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||
pub fn weak_count(&self) -> Option<usize> {
|
||||
self.inner().map(|inner| {
|
||||
if inner.strong() > 0 {
|
||||
|
@ -1122,7 +1122,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 = "0")]
|
||||
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||
pub fn strong_count(&self) -> usize {
|
||||
if let Some(inner) = self.inner() {
|
||||
inner.strong.load(SeqCst)
|
||||
@ -1145,7 +1145,7 @@ impl<T: ?Sized> Weak<T> {
|
||||
/// `Weak`s pointing to the same value.
|
||||
///
|
||||
/// [`Weak::new`]: #method.new
|
||||
#[unstable(feature = "weak_counts", issue = "0")]
|
||||
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user