@@ -870,15 +870,13 @@ impl<T: ?Sized> Arc<T> {
870
870
/// # Examples
871
871
///
872
872
/// ```
873
- /// #![feature(arc_mutate_strong_count)]
874
- ///
875
873
/// use std::sync::Arc;
876
874
///
877
875
/// let five = Arc::new(5);
878
876
///
879
877
/// unsafe {
880
878
/// let ptr = Arc::into_raw(five);
881
- /// Arc::incr_strong_count (ptr);
879
+ /// Arc::increment_strong_count (ptr);
882
880
///
883
881
/// // This assertion is deterministic because we haven't shared
884
882
/// // the `Arc` between threads.
@@ -887,8 +885,8 @@ impl<T: ?Sized> Arc<T> {
887
885
/// }
888
886
/// ```
889
887
#[ inline]
890
- #[ unstable ( feature = "arc_mutate_strong_count" , issue = "71983 " ) ]
891
- pub unsafe fn incr_strong_count ( ptr : * const T ) {
888
+ #[ stable ( feature = "arc_mutate_strong_count" , since = "1.50.0 " ) ]
889
+ pub unsafe fn increment_strong_count ( ptr : * const T ) {
892
890
// Retain Arc, but don't touch refcount by wrapping in ManuallyDrop
893
891
let arc = unsafe { mem:: ManuallyDrop :: new ( Arc :: < T > :: from_raw ( ptr) ) } ;
894
892
// Now increase refcount, but don't drop new refcount either
@@ -909,27 +907,25 @@ impl<T: ?Sized> Arc<T> {
909
907
/// # Examples
910
908
///
911
909
/// ```
912
- /// #![feature(arc_mutate_strong_count)]
913
- ///
914
910
/// use std::sync::Arc;
915
911
///
916
912
/// let five = Arc::new(5);
917
913
///
918
914
/// unsafe {
919
915
/// let ptr = Arc::into_raw(five);
920
- /// Arc::incr_strong_count (ptr);
916
+ /// Arc::increment_strong_count (ptr);
921
917
///
922
918
/// // Those assertions are deterministic because we haven't shared
923
919
/// // the `Arc` between threads.
924
920
/// let five = Arc::from_raw(ptr);
925
921
/// assert_eq!(2, Arc::strong_count(&five));
926
- /// Arc::decr_strong_count (ptr);
922
+ /// Arc::decrement_strong_count (ptr);
927
923
/// assert_eq!(1, Arc::strong_count(&five));
928
924
/// }
929
925
/// ```
930
926
#[ inline]
931
- #[ unstable ( feature = "arc_mutate_strong_count" , issue = "71983 " ) ]
932
- pub unsafe fn decr_strong_count ( ptr : * const T ) {
927
+ #[ stable ( feature = "arc_mutate_strong_count" , since = "1.50.0 " ) ]
928
+ pub unsafe fn decrement_strong_count ( ptr : * const T ) {
933
929
unsafe { mem:: drop ( Arc :: from_raw ( ptr) ) } ;
934
930
}
935
931
0 commit comments