@@ -428,7 +428,7 @@ impl<T> Arc<T> {
428
428
/// }
429
429
///
430
430
/// impl Gadget {
431
- /// /// Construct a reference counted Gadget.
431
+ /// /// Constructs a reference counted Gadget.
432
432
/// fn new() -> Arc<Self> {
433
433
/// // `me` is a `Weak<Gadget>` pointing at the new allocation of the
434
434
/// // `Arc` we're constructing.
@@ -438,7 +438,7 @@ impl<T> Arc<T> {
438
438
/// })
439
439
/// }
440
440
///
441
- /// /// Return a reference counted pointer to Self.
441
+ /// /// Returns a reference counted pointer to Self.
442
442
/// fn me(&self) -> Arc<Self> {
443
443
/// self.me.upgrade().unwrap()
444
444
/// }
@@ -2534,7 +2534,7 @@ unsafe impl<#[may_dangle] T: ?Sized, A: Allocator> Drop for Arc<T, A> {
2534
2534
}
2535
2535
2536
2536
impl < A : Allocator > Arc < dyn Any + Send + Sync , A > {
2537
- /// Attempt to downcast the `Arc<dyn Any + Send + Sync>` to a concrete type.
2537
+ /// Attempts to downcast the `Arc<dyn Any + Send + Sync>` to a concrete type.
2538
2538
///
2539
2539
/// # Examples
2540
2540
///
@@ -3550,7 +3550,7 @@ impl<T, const N: usize> From<[T; N]> for Arc<[T]> {
3550
3550
#[ cfg( not( no_global_oom_handling) ) ]
3551
3551
#[ stable( feature = "shared_from_slice" , since = "1.21.0" ) ]
3552
3552
impl < T : Clone > From < & [ T ] > for Arc < [ T ] > {
3553
- /// Allocate a reference-counted slice and fill it by cloning `v`'s items.
3553
+ /// Allocates a reference-counted slice and fills it by cloning `v`'s items.
3554
3554
///
3555
3555
/// # Example
3556
3556
///
@@ -3569,7 +3569,7 @@ impl<T: Clone> From<&[T]> for Arc<[T]> {
3569
3569
#[ cfg( not( no_global_oom_handling) ) ]
3570
3570
#[ stable( feature = "shared_from_slice" , since = "1.21.0" ) ]
3571
3571
impl From < & str > for Arc < str > {
3572
- /// Allocate a reference-counted `str` and copy `v` into it.
3572
+ /// Allocates a reference-counted `str` and copies `v` into it.
3573
3573
///
3574
3574
/// # Example
3575
3575
///
@@ -3588,7 +3588,7 @@ impl From<&str> for Arc<str> {
3588
3588
#[ cfg( not( no_global_oom_handling) ) ]
3589
3589
#[ stable( feature = "shared_from_slice" , since = "1.21.0" ) ]
3590
3590
impl From < String > for Arc < str > {
3591
- /// Allocate a reference-counted `str` and copy `v` into it.
3591
+ /// Allocates a reference-counted `str` and copies `v` into it.
3592
3592
///
3593
3593
/// # Example
3594
3594
///
@@ -3626,7 +3626,7 @@ impl<T: ?Sized, A: Allocator> From<Box<T, A>> for Arc<T, A> {
3626
3626
#[ cfg( not( no_global_oom_handling) ) ]
3627
3627
#[ stable( feature = "shared_from_slice" , since = "1.21.0" ) ]
3628
3628
impl < T , A : Allocator + Clone > From < Vec < T , A > > for Arc < [ T ] , A > {
3629
- /// Allocate a reference-counted slice and move `v`'s items into it.
3629
+ /// Allocates a reference-counted slice and moves `v`'s items into it.
3630
3630
///
3631
3631
/// # Example
3632
3632
///
@@ -3659,8 +3659,8 @@ where
3659
3659
B : ToOwned + ?Sized ,
3660
3660
Arc < B > : From < & ' a B > + From < B :: Owned > ,
3661
3661
{
3662
- /// Create an atomically reference-counted pointer from
3663
- /// a clone-on-write pointer by copying its content.
3662
+ /// Creates an atomically reference-counted pointer from a clone-on-write
3663
+ /// pointer by copying its content.
3664
3664
///
3665
3665
/// # Example
3666
3666
///
@@ -3816,7 +3816,7 @@ impl<T: ?Sized, A: Allocator> AsRef<T> for Arc<T, A> {
3816
3816
#[ stable( feature = "pin" , since = "1.33.0" ) ]
3817
3817
impl < T : ?Sized , A : Allocator > Unpin for Arc < T , A > { }
3818
3818
3819
- /// Get the offset within an `ArcInner` for the payload behind a pointer.
3819
+ /// Gets the offset within an `ArcInner` for the payload behind a pointer.
3820
3820
///
3821
3821
/// # Safety
3822
3822
///
@@ -3838,7 +3838,7 @@ fn data_offset_align(align: usize) -> usize {
3838
3838
layout. size ( ) + layout. padding_needed_for ( align)
3839
3839
}
3840
3840
3841
- /// A unique owning pointer to a [`ArcInner`] **that does not imply the contents are initialized,**
3841
+ /// A unique owning pointer to an [`ArcInner`] **that does not imply the contents are initialized,**
3842
3842
/// but will deallocate it (without dropping the value) when dropped.
3843
3843
///
3844
3844
/// This is a helper for [`Arc::make_mut()`] to ensure correct cleanup on panic.
@@ -3851,7 +3851,7 @@ struct UniqueArcUninit<T: ?Sized, A: Allocator> {
3851
3851
3852
3852
#[ cfg( not( no_global_oom_handling) ) ]
3853
3853
impl < T : ?Sized , A : Allocator > UniqueArcUninit < T , A > {
3854
- /// Allocate a ArcInner with layout suitable to contain `for_value` or a clone of it.
3854
+ /// Allocates an ArcInner with layout suitable to contain `for_value` or a clone of it.
3855
3855
fn new ( for_value : & T , alloc : A ) -> UniqueArcUninit < T , A > {
3856
3856
let layout = Layout :: for_value ( for_value) ;
3857
3857
let ptr = unsafe {
0 commit comments