Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions library/alloc/src/rcs/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2870,8 +2870,6 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
/// # Examples
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::sync::Arc;
///
/// let x = Arc::new(3);
Expand All @@ -2894,8 +2892,6 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
/// following code is valid, even though it would be UB if it used `Arc::get_mut`:
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::sync::Arc;
///
/// let arc = Arc::new(5);
Expand All @@ -2915,7 +2911,7 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
///
/// [`get_mut_unchecked`]: Self::get_mut_unchecked
#[inline]
#[unstable(feature = "arc_is_unique", issue = "138938")]
#[stable(feature = "arc_is_unique", since = "CURRENT_RUSTC_VERSION")]
pub fn is_unique(this: &Self) -> bool {
// lock the weak pointer count if we appear to be the sole weak pointer
// holder.
Expand Down
6 changes: 1 addition & 5 deletions library/alloc/src/rcs/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1996,8 +1996,6 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
/// # Examples
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::rc::Rc;
///
/// let x = Rc::new(3);
Expand All @@ -2020,8 +2018,6 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
/// following code is valid, even though it would be UB if it used `Rc::get_mut`:
///
/// ```
/// #![feature(arc_is_unique)]
///
/// use std::rc::Rc;
///
/// let rc = Rc::new(5);
Expand All @@ -2032,7 +2028,7 @@ impl<T: ?Sized, A: Allocator> Rc<T, A> {
///
/// [`get_mut_unchecked`]: Self::get_mut_unchecked
#[inline]
#[unstable(feature = "arc_is_unique", issue = "138938")]
#[stable(feature = "arc_is_unique", since = "CURRENT_RUSTC_VERSION")]
pub fn is_unique(this: &Self) -> bool {
Rc::weak_count(this) == 0 && Rc::strong_count(this) == 1
}
Expand Down
Loading