Add tracking issue to unstable attribute
This commit is contained in:
parent
b664341d91
commit
0d314f08af
2 changed files with 4 additions and 4 deletions
|
@ -1289,7 +1289,7 @@ impl<T: ?Sized> Weak<T> {
|
||||||
/// If `self` was created using [`Weak::new`], this will return 0.
|
/// If `self` was created using [`Weak::new`], this will return 0.
|
||||||
///
|
///
|
||||||
/// [`Weak::new`]: #method.new
|
/// [`Weak::new`]: #method.new
|
||||||
#[unstable(feature = "weak_counts", issue = "0")]
|
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||||
pub fn strong_count(&self) -> usize {
|
pub fn strong_count(&self) -> usize {
|
||||||
if let Some(inner) = self.inner() {
|
if let Some(inner) = self.inner() {
|
||||||
inner.strong()
|
inner.strong()
|
||||||
|
@ -1305,7 +1305,7 @@ impl<T: ?Sized> Weak<T> {
|
||||||
/// value.
|
/// value.
|
||||||
///
|
///
|
||||||
/// [`Weak::new`]: #method.new
|
/// [`Weak::new`]: #method.new
|
||||||
#[unstable(feature = "weak_counts", issue = "0")]
|
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||||
pub fn weak_count(&self) -> Option<usize> {
|
pub fn weak_count(&self) -> Option<usize> {
|
||||||
self.inner().map(|inner| {
|
self.inner().map(|inner| {
|
||||||
if inner.strong() > 0 {
|
if inner.strong() > 0 {
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ impl<T: ?Sized> Weak<T> {
|
||||||
/// If `self` was created using [`Weak::new`], this will return 0.
|
/// If `self` was created using [`Weak::new`], this will return 0.
|
||||||
///
|
///
|
||||||
/// [`Weak::new`]: #method.new
|
/// [`Weak::new`]: #method.new
|
||||||
#[unstable(feature = "weak_counts", issue = "0")]
|
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||||
pub fn strong_count(&self) -> usize {
|
pub fn strong_count(&self) -> usize {
|
||||||
if let Some(inner) = self.inner() {
|
if let Some(inner) = self.inner() {
|
||||||
inner.strong.load(SeqCst)
|
inner.strong.load(SeqCst)
|
||||||
|
@ -1145,7 +1145,7 @@ impl<T: ?Sized> Weak<T> {
|
||||||
/// `Weak`s pointing to the same value.
|
/// `Weak`s pointing to the same value.
|
||||||
///
|
///
|
||||||
/// [`Weak::new`]: #method.new
|
/// [`Weak::new`]: #method.new
|
||||||
#[unstable(feature = "weak_counts", issue = "0")]
|
#[unstable(feature = "weak_counts", issue = "57977")]
|
||||||
pub fn weak_count(&self) -> Option<usize> {
|
pub fn weak_count(&self) -> Option<usize> {
|
||||||
// Due to the implicit weak pointer added when any strong pointers are
|
// Due to the implicit weak pointer added when any strong pointers are
|
||||||
// around, we cannot implement `weak_count` correctly since it
|
// around, we cannot implement `weak_count` correctly since it
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue