@@ -363,6 +363,7 @@ impl<T> Rc<T> {
363363 #[ unstable( feature = "rc_would_unwrap" ,
364364 reason = "just added for niche usecase" ,
365365 issue = "28356" ) ]
366+ #[ rustc_deprecated( since = "1.15.0" , reason = "too niche; use `strong_count` instead" ) ]
366367 pub fn would_unwrap ( this : & Self ) -> bool {
367368 Rc :: strong_count ( & this) == 1
368369 }
@@ -482,8 +483,6 @@ impl<T: ?Sized> Rc<T> {
482483 /// # Examples
483484 ///
484485 /// ```
485- /// #![feature(rc_counts)]
486- ///
487486 /// use std::rc::Rc;
488487 ///
489488 /// let five = Rc::new(5);
@@ -492,8 +491,7 @@ impl<T: ?Sized> Rc<T> {
492491 /// assert_eq!(1, Rc::weak_count(&five));
493492 /// ```
494493 #[ inline]
495- #[ unstable( feature = "rc_counts" , reason = "not clearly useful" ,
496- issue = "28356" ) ]
494+ #[ stable( feature = "rc_counts" , since = "1.15.0" ) ]
497495 pub fn weak_count ( this : & Self ) -> usize {
498496 this. weak ( ) - 1
499497 }
@@ -503,8 +501,6 @@ impl<T: ?Sized> Rc<T> {
503501 /// # Examples
504502 ///
505503 /// ```
506- /// #![feature(rc_counts)]
507- ///
508504 /// use std::rc::Rc;
509505 ///
510506 /// let five = Rc::new(5);
@@ -513,8 +509,7 @@ impl<T: ?Sized> Rc<T> {
513509 /// assert_eq!(2, Rc::strong_count(&five));
514510 /// ```
515511 #[ inline]
516- #[ unstable( feature = "rc_counts" , reason = "not clearly useful" ,
517- issue = "28356" ) ]
512+ #[ stable( feature = "rc_counts" , since = "1.15.0" ) ]
518513 pub fn strong_count ( this : & Self ) -> usize {
519514 this. strong ( )
520515 }
@@ -538,6 +533,8 @@ impl<T: ?Sized> Rc<T> {
538533 #[ inline]
539534 #[ unstable( feature = "rc_counts" , reason = "uniqueness has unclear meaning" ,
540535 issue = "28356" ) ]
536+ #[ rustc_deprecated( since = "1.15.0" ,
537+ reason = "too niche; use `strong_count` and `weak_count` instead" ) ]
541538 pub fn is_unique ( this : & Self ) -> bool {
542539 Rc :: weak_count ( this) == 0 && Rc :: strong_count ( this) == 1
543540 }
0 commit comments