@@ -2527,12 +2527,12 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
2527
2527
}
2528
2528
2529
2529
/// Determine whether this is the unique reference to the underlying data.
2530
+ ///
2530
2531
/// Returns `true` if there are no other `Arc` or [`Weak`] pointers to the same allocation;
2531
2532
/// returns `false` otherwise.
2532
2533
///
2533
- /// If this function returns `true`,
2534
- /// then is guaranteed to be safe to call [`get_mut_unchecked`] on this `Arc`,
2535
- /// so long as no clones occur in between.
2534
+ /// If this function returns `true`, then is guaranteed to be safe to call [`get_mut_unchecked`]
2535
+ /// on this `Arc`, so long as no clones occur in between.
2536
2536
///
2537
2537
/// # Examples
2538
2538
///
@@ -2555,13 +2555,10 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
2555
2555
///
2556
2556
/// # Pointer invalidation
2557
2557
///
2558
- /// This function
2559
- /// will always return the same value as `Arc::get_mut(arc).is_some()`.
2560
- /// However, unlike that operation
2561
- /// it does not produce any mutable references to the underlying data,
2562
- /// meaning no pointers to the data inside the `Arc` are invalidated by the call.
2563
- /// Thus, the following code is valid,
2564
- /// even though it would be UB if it used `Arc::get_mut`:
2558
+ /// This function will always return the same value as `Arc::get_mut(arc).is_some()`. However,
2559
+ /// unlike that operation it does not produce any mutable references to the underlying data,
2560
+ /// meaning no pointers to the data inside the `Arc` are invalidated by the call. Thus, the
2561
+ /// following code is valid, even though it would be UB if it used `Arc::get_mut`:
2565
2562
///
2566
2563
/// ```
2567
2564
/// #![feature(arc_is_unique)]
@@ -2576,14 +2573,12 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
2576
2573
///
2577
2574
/// # Atomic orderings
2578
2575
///
2579
- /// Concurrent drops to other `Arc` pointers to the same allocation
2580
- /// will synchronize with this call -
2581
- /// that is, this call performs an `Acquire` operation
2582
- /// on the underlying strong and weak ref counts.
2583
- /// This ensures that calling `get_mut_unchecked` is safe.
2576
+ /// Concurrent drops to other `Arc` pointers to the same allocation will synchronize with this
2577
+ /// call - that is, this call performs an `Acquire` operation on the underlying strong and weak
2578
+ /// ref counts. This ensures that calling `get_mut_unchecked` is safe.
2584
2579
///
2585
- /// Note that this operation requires locking the weak ref count,
2586
- /// so concurrent calls to `downgrade` may spin-loop for a short period of time.
2580
+ /// Note that this operation requires locking the weak ref count, so concurrent calls to
2581
+ /// `downgrade` may spin-loop for a short period of time.
2587
2582
///
2588
2583
/// [`get_mut_unchecked`]: Self::get_mut_unchecked
2589
2584
#[ inline]
0 commit comments