Rollup merge of #127765 - bitfield:fix_stdlib_doc_nits, r=dtolnay · model-checking/verify-rust-std@058f1d3 (original) (raw)
`@@ -428,7 +428,7 @@ impl Arc {
`
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 {
`
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 Arc {
`
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 {
`
443
443
`/// self.me.upgrade().unwrap()
`
444
444
`/// }
`
`@@ -2531,7 +2531,7 @@ unsafe impl<#[may_dangle] T: ?Sized, A: Allocator> Drop for Arc<T, A> {
`
2531
2531
`}
`
2532
2532
``
2533
2533
`impl<A: Allocator> Arc<dyn Any + Send + Sync, A> {
`
2534
``
`` -
/// Attempt to downcast the Arc<dyn Any + Send + Sync>
to a concrete type.
``
``
2534
`` +
/// Attempts to downcast the Arc<dyn Any + Send + Sync>
to a concrete type.
``
2535
2535
`///
`
2536
2536
`/// # Examples
`
2537
2537
`///
`
`@@ -3545,7 +3545,7 @@ impl<T, const N: usize> From<[T; N]> for Arc<[T]> {
`
3545
3545
`#[cfg(not(no_global_oom_handling))]
`
3546
3546
`#[stable(feature = "shared_from_slice", since = "1.21.0")]
`
3547
3547
`impl<T: Clone> From<&[T]> for Arc<[T]> {
`
3548
``
`` -
/// Allocate a reference-counted slice and fill it by cloning v
's items.
``
``
3548
`` +
/// Allocates a reference-counted slice and fills it by cloning v
's items.
``
3549
3549
`///
`
3550
3550
`/// # Example
`
3551
3551
`///
`
`@@ -3564,7 +3564,7 @@ impl<T: Clone> From<&[T]> for Arc<[T]> {
`
3564
3564
`#[cfg(not(no_global_oom_handling))]
`
3565
3565
`#[stable(feature = "shared_from_slice", since = "1.21.0")]
`
3566
3566
`impl From<&str> for Arc {
`
3567
``
`` -
/// Allocate a reference-counted str
and copy v
into it.
``
``
3567
`` +
/// Allocates a reference-counted str
and copies v
into it.
``
3568
3568
`///
`
3569
3569
`/// # Example
`
3570
3570
`///
`
`@@ -3583,7 +3583,7 @@ impl From<&str> for Arc {
`
3583
3583
`#[cfg(not(no_global_oom_handling))]
`
3584
3584
`#[stable(feature = "shared_from_slice", since = "1.21.0")]
`
3585
3585
`impl From for Arc {
`
3586
``
`` -
/// Allocate a reference-counted str
and copy v
into it.
``
``
3586
`` +
/// Allocates a reference-counted str
and copies v
into it.
``
3587
3587
`///
`
3588
3588
`/// # Example
`
3589
3589
`///
`
`@@ -3621,7 +3621,7 @@ impl<T: ?Sized, A: Allocator> From<Box<T, A>> for Arc<T, A> {
`
3621
3621
`#[cfg(not(no_global_oom_handling))]
`
3622
3622
`#[stable(feature = "shared_from_slice", since = "1.21.0")]
`
3623
3623
`impl<T, A: Allocator + Clone> From<Vec<T, A>> for Arc<[T], A> {
`
3624
``
`` -
/// Allocate a reference-counted slice and move v
's items into it.
``
``
3624
`` +
/// Allocates a reference-counted slice and moves v
's items into it.
``
3625
3625
`///
`
3626
3626
`/// # Example
`
3627
3627
`///
`
`@@ -3654,8 +3654,8 @@ where
`
3654
3654
`B: ToOwned + ?Sized,
`
3655
3655
`Arc: From<&'a B> + From<B::Owned>,
`
3656
3656
`{
`
3657
``
`-
/// Create an atomically reference-counted pointer from
`
3658
``
`-
/// a clone-on-write pointer by copying its content.
`
``
3657
`+
/// Creates an atomically reference-counted pointer from a clone-on-write
`
``
3658
`+
/// pointer by copying its content.
`
3659
3659
`///
`
3660
3660
`/// # Example
`
3661
3661
`///
`
`@@ -3811,7 +3811,7 @@ impl<T: ?Sized, A: Allocator> AsRef for Arc<T, A> {
`
3811
3811
`#[stable(feature = "pin", since = "1.33.0")]
`
3812
3812
`impl<T: ?Sized, A: Allocator> Unpin for Arc<T, A> {}
`
3813
3813
``
3814
``
`` -
/// Get the offset within an ArcInner
for the payload behind a pointer.
``
``
3814
`` +
/// Gets the offset within an ArcInner
for the payload behind a pointer.
``
3815
3815
`///
`
3816
3816
`/// # Safety
`
3817
3817
`///
`
`@@ -3833,7 +3833,7 @@ fn data_offset_align(align: usize) -> usize {
`
3833
3833
` layout.size() + layout.padding_needed_for(align)
`
3834
3834
`}
`
3835
3835
``
3836
``
`` -
/// A unique owning pointer to a [ArcInner
] that does not imply the contents are initialized,
``
``
3836
`` +
/// A unique owning pointer to an [ArcInner
] that does not imply the contents are initialized,
``
3837
3837
`/// but will deallocate it (without dropping the value) when dropped.
`
3838
3838
`///
`
3839
3839
`` /// This is a helper for [Arc::make_mut()
] to ensure correct cleanup on panic.
``
`@@ -3846,7 +3846,7 @@ struct UniqueArcUninit<T: ?Sized, A: Allocator> {
`
3846
3846
``
3847
3847
`#[cfg(not(no_global_oom_handling))]
`
3848
3848
`impl<T: ?Sized, A: Allocator> UniqueArcUninit<T, A> {
`
3849
``
`` -
/// Allocate a ArcInner with layout suitable to contain for_value
or a clone of it.
``
``
3849
`` +
/// Allocates an ArcInner with layout suitable to contain for_value
or a clone of it.
``
3850
3850
`fn new(for_value: &T, alloc: A) -> UniqueArcUninit<T, A> {
`
3851
3851
`let layout = Layout::for_value(for_value);
`
3852
3852
`let ptr = unsafe {
`