Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
Simon Sapin 2019-08-17 15:15:17 +02:00
parent 7a641f7c51
commit ba0328327c
4 changed files with 15 additions and 15 deletions

View file

@ -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
///
@ -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
///
@ -192,7 +192,7 @@ impl<T> Box<[T]> {
}
impl<T> Box<mem::MaybeUninit<T>> {
/// Convert to `Box<T>`.
/// Converts to `Box<T>`.
///
/// # Safety
///
@ -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
///

View file

@ -327,7 +327,7 @@ impl<T> Rc<T> {
}))
}
/// Construct a new Rc with uninitialized contents.
/// Constructs a new `Rc` with uninitialized contents.
///
/// # Examples
///
@ -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
///
@ -441,7 +441,7 @@ impl<T> Rc<[T]> {
}
impl<T> Rc<mem::MaybeUninit<T>> {
/// Convert to `Rc<T>`.
/// Converts to `Rc<T>`.
///
/// # Safety
///
@ -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
///
@ -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

View file

@ -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
///
@ -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
///
@ -425,7 +425,7 @@ impl<T> Arc<[T]> {
}
impl<T> Arc<mem::MaybeUninit<T>> {
/// Convert to `Arc<T>`.
/// Converts to `Arc<T>`.
///
/// # Safety
///
@ -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
///
@ -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

View file

@ -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 {