Skip to content

Commit

Permalink
Doc nits
Browse files Browse the repository at this point in the history
Co-Authored-By: Ralf Jung <[email protected]>
  • Loading branch information
SimonSapin and RalfJung committed Aug 17, 2019
1 parent 7a641f7 commit ba03283
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl<T> Box<T> {
box x
}

/// Construct a new box with uninitialized contents.
/// Constructs a new box with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -161,7 +161,7 @@ impl<T> Box<T> {
}

impl<T> Box<[T]> {
/// Construct a new boxed slice with uninitialized contents.
/// Constructs a new boxed slice with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -192,7 +192,7 @@ impl<T> Box<[T]> {
}

impl<T> Box<mem::MaybeUninit<T>> {
/// Convert to `Box<T>`.
/// Converts to `Box<T>`.
///
/// # Safety
///
Expand Down Expand Up @@ -228,7 +228,7 @@ impl<T> Box<mem::MaybeUninit<T>> {
}

impl<T> Box<[mem::MaybeUninit<T>]> {
/// Convert to `Box<[T]>`.
/// Converts to `Box<[T]>`.
///
/// # Safety
///
Expand Down
10 changes: 5 additions & 5 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl<T> Rc<T> {
}))
}

/// Construct a new Rc with uninitialized contents.
/// Constructs a new `Rc` with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -409,7 +409,7 @@ impl<T> Rc<T> {
}

impl<T> Rc<[T]> {
/// Construct a new reference-counted slice with uninitialized contents.
/// Constructs a new reference-counted slice with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -441,7 +441,7 @@ impl<T> Rc<[T]> {
}

impl<T> Rc<mem::MaybeUninit<T>> {
/// Convert to `Rc<T>`.
/// Converts to `Rc<T>`.
///
/// # Safety
///
Expand Down Expand Up @@ -480,7 +480,7 @@ impl<T> Rc<mem::MaybeUninit<T>> {
}

impl<T> Rc<[mem::MaybeUninit<T>]> {
/// Convert to `Rc<[T]>`.
/// Converts to `Rc<[T]>`.
///
/// # Safety
///
Expand Down Expand Up @@ -721,7 +721,7 @@ impl<T: ?Sized> Rc<T> {
///
/// Any other `Rc` or [`Weak`] pointers to the same value must not be dereferenced
/// for the duration of the returned borrow.
/// This is trivially the case if no such pointer exist,
/// This is trivially the case if no such pointers exist,
/// for example immediately after `Rc::new`.
///
/// # Examples
Expand Down
10 changes: 5 additions & 5 deletions src/liballoc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl<T> Arc<T> {
Self::from_inner(Box::into_raw_non_null(x))
}

/// Construct a Arc box with uninitialized contents.
/// Constructs a new `Arc` with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -393,7 +393,7 @@ impl<T> Arc<T> {
}

impl<T> Arc<[T]> {
/// Construct a new reference-counted slice with uninitialized contents.
/// Constructs a new reference-counted slice with uninitialized contents.
///
/// # Examples
///
Expand Down Expand Up @@ -425,7 +425,7 @@ impl<T> Arc<[T]> {
}

impl<T> Arc<mem::MaybeUninit<T>> {
/// Convert to `Arc<T>`.
/// Converts to `Arc<T>`.
///
/// # Safety
///
Expand Down Expand Up @@ -464,7 +464,7 @@ impl<T> Arc<mem::MaybeUninit<T>> {
}

impl<T> Arc<[mem::MaybeUninit<T>]> {
/// Convert to `Arc<[T]>`.
/// Converts to `Arc<[T]>`.
///
/// # Safety
///
Expand Down Expand Up @@ -1106,7 +1106,7 @@ impl<T: ?Sized> Arc<T> {
///
/// Any other `Arc` or [`Weak`] pointers to the same value must not be dereferenced
/// for the duration of the returned borrow.
/// This is trivially the case if no such pointer exist,
/// This is trivially the case if no such pointers exist,
/// for example immediately after `Arc::new`.
///
/// # Examples
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/ptr/unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl<T: ?Sized> Unique<T> {
&mut *self.as_ptr()
}

/// Cast to a pointer of another type
/// Casts to a pointer of another type
#[inline]
pub const fn cast<U>(self) -> Unique<U> {
unsafe {
Expand Down

0 comments on commit ba03283

Please sign in to comment.