Skip to content

Commit 760424a

Browse files
committed
expand as_[mut_]ptr docs a bit
1 parent 9a460aa commit 760424a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/mem.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,16 +1174,16 @@ impl<T> MaybeUninit<T> {
11741174
&mut *self.value
11751175
}
11761176

1177-
/// Get a pointer to the contained value. Reading from this pointer will be undefined
1178-
/// behavior unless the `MaybeUninit` is initialized.
1177+
/// Get a pointer to the contained value. Reading from this pointer or turning it
1178+
/// into a reference will be undefined behavior unless the `MaybeUninit` is initialized.
11791179
#[unstable(feature = "maybe_uninit", issue = "53491")]
11801180
#[inline(always)]
11811181
pub fn as_ptr(&self) -> *const T {
11821182
unsafe { &*self.value as *const T }
11831183
}
11841184

1185-
/// Get a mutable pointer to the contained value. Reading from this pointer will be undefined
1186-
/// behavior unless the `MaybeUninit` is initialized.
1185+
/// Get a mutable pointer to the contained value. Reading from this pointer or turning it
1186+
/// into a reference will be undefined behavior unless the `MaybeUninit` is initialized.
11871187
#[unstable(feature = "maybe_uninit", issue = "53491")]
11881188
#[inline(always)]
11891189
pub fn as_mut_ptr(&mut self) -> *mut T {

0 commit comments

Comments
 (0)