diff options
| author | Ralf Jung <post@ralfj.de> | 2019-02-03 22:11:28 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2019-02-03 22:11:28 +0100 |
| commit | 760424af17bc40c4fd2be95e96ebcebe70d217e9 (patch) | |
| tree | ddbdf335ff90d29c29d275e9b1e58e5177b9acc2 | |
| parent | 9a460aac37e91f66f9ba79824dbf62105733efee (diff) | |
| download | rust-760424af17bc40c4fd2be95e96ebcebe70d217e9.tar.gz rust-760424af17bc40c4fd2be95e96ebcebe70d217e9.zip | |
expand as_[mut_]ptr docs a bit
| -rw-r--r-- | src/libcore/mem.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 998e892bffb..3348e774a0b 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -1174,16 +1174,16 @@ impl<T> MaybeUninit<T> { &mut *self.value } - /// Get a pointer to the contained value. Reading from this pointer will be undefined - /// behavior unless the `MaybeUninit` is initialized. + /// Get a pointer to the contained value. Reading from this pointer or turning it + /// into a reference will be undefined behavior unless the `MaybeUninit` is initialized. #[unstable(feature = "maybe_uninit", issue = "53491")] #[inline(always)] pub fn as_ptr(&self) -> *const T { unsafe { &*self.value as *const T } } - /// Get a mutable pointer to the contained value. Reading from this pointer will be undefined - /// behavior unless the `MaybeUninit` is initialized. + /// Get a mutable pointer to the contained value. Reading from this pointer or turning it + /// into a reference will be undefined behavior unless the `MaybeUninit` is initialized. #[unstable(feature = "maybe_uninit", issue = "53491")] #[inline(always)] pub fn as_mut_ptr(&mut self) -> *mut T { |
