Skip to content

Commit

Permalink
Bump stable version of arc_mutate_strong_count
Browse files Browse the repository at this point in the history
  • Loading branch information
m-ou-se committed Jan 30, 2021
1 parent a55039d commit fe4ac95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ impl<T: ?Sized> Arc<T> {
/// }
/// ```
#[inline]
#[stable(feature = "arc_mutate_strong_count", since = "1.50.0")]
#[stable(feature = "arc_mutate_strong_count", since = "1.51.0")]
pub unsafe fn increment_strong_count(ptr: *const T) {
// Retain Arc, but don't touch refcount by wrapping in ManuallyDrop
let arc = unsafe { mem::ManuallyDrop::new(Arc::<T>::from_raw(ptr)) };
Expand Down Expand Up @@ -924,7 +924,7 @@ impl<T: ?Sized> Arc<T> {
/// }
/// ```
#[inline]
#[stable(feature = "arc_mutate_strong_count", since = "1.50.0")]
#[stable(feature = "arc_mutate_strong_count", since = "1.51.0")]
pub unsafe fn decrement_strong_count(ptr: *const T) {
unsafe { mem::drop(Arc::from_raw(ptr)) };
}
Expand Down

0 comments on commit fe4ac95

Please sign in to comment.