remark that the rules are unfinished
This commit is contained in:
parent
8ce9b8667a
commit
a5e2d0c4e5
1 changed files with 4 additions and 0 deletions
|
|
@ -1230,6 +1230,8 @@ impl<T> MaybeUninit<T> {
|
|||
/// let x_vec = unsafe { &*x.as_ptr() };
|
||||
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
|
||||
/// ```
|
||||
/// (Notice that the rules around referenced to uninitialized data are not finalized yet, but
|
||||
/// until they are, it is advisable to avoid them.)
|
||||
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
||||
#[inline(always)]
|
||||
pub fn as_ptr(&self) -> *const T {
|
||||
|
|
@ -1266,6 +1268,8 @@ impl<T> MaybeUninit<T> {
|
|||
/// let x_vec = unsafe { &mut *x.as_mut_ptr() };
|
||||
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
|
||||
/// ```
|
||||
/// (Notice that the rules around referenced to uninitialized data are not finalized yet, but
|
||||
/// until they are, it is advisable to avoid them.)
|
||||
#[unstable(feature = "maybe_uninit", issue = "53491")]
|
||||
#[inline(always)]
|
||||
pub fn as_mut_ptr(&mut self) -> *mut T {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue