fix typos, improve docs

This commit is contained in:
Ralf Jung 2019-01-28 11:04:30 +01:00
parent 0e8fb93249
commit 33a969d9fa

View file

@ -1149,14 +1149,14 @@ impl<T> MaybeUninit<T> {
unsafe { &mut *self.value as *mut T } unsafe { &mut *self.value as *mut T }
} }
/// Get a pointer to the first contained values. /// Get a pointer to the first element of the array.
#[unstable(feature = "maybe_uninit", issue = "53491")] #[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)] #[inline(always)]
pub fn first_ptr(this: &[MaybeUninit<T>]) -> *const T { pub fn first_ptr(this: &[MaybeUninit<T>]) -> *const T {
this as *const [MaybeUninit<T>] as *const T this as *const [MaybeUninit<T>] as *const T
} }
/// Get a mutable pointer to the first contained values. /// Get a mutable pointer to the first element of the array.
#[unstable(feature = "maybe_uninit", issue = "53491")] #[unstable(feature = "maybe_uninit", issue = "53491")]
#[inline(always)] #[inline(always)]
pub fn first_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T { pub fn first_mut_ptr(this: &mut [MaybeUninit<T>]) -> *mut T {