Skip to content

Commit 24d8d25

Browse files
committed
Rewrap doc comments
1 parent 8ca722a commit 24d8d25

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

library/alloc/src/sync.rs

+12-17
Original file line numberDiff line numberDiff line change
@@ -2527,12 +2527,12 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
25272527
}
25282528

25292529
/// Determine whether this is the unique reference to the underlying data.
2530+
///
25302531
/// Returns `true` if there are no other `Arc` or [`Weak`] pointers to the same allocation;
25312532
/// returns `false` otherwise.
25322533
///
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.
25362536
///
25372537
/// # Examples
25382538
///
@@ -2555,13 +2555,10 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
25552555
///
25562556
/// # Pointer invalidation
25572557
///
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`:
25652562
///
25662563
/// ```
25672564
/// #![feature(arc_is_unique)]
@@ -2576,14 +2573,12 @@ impl<T: ?Sized, A: Allocator> Arc<T, A> {
25762573
///
25772574
/// # Atomic orderings
25782575
///
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.
25842579
///
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.
25872582
///
25882583
/// [`get_mut_unchecked`]: Self::get_mut_unchecked
25892584
#[inline]

0 commit comments

Comments
 (0)