Skip to content

Commit a5e2d0c

Browse files
committed
remark that the rules are unfinished
1 parent 8ce9b86 commit a5e2d0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/mem.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,8 @@ impl<T> MaybeUninit<T> {
12301230
/// let x_vec = unsafe { &*x.as_ptr() };
12311231
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
12321232
/// ```
1233+
/// (Notice that the rules around referenced to uninitialized data are not finalized yet, but
1234+
/// until they are, it is advisable to avoid them.)
12331235
#[unstable(feature = "maybe_uninit", issue = "53491")]
12341236
#[inline(always)]
12351237
pub fn as_ptr(&self) -> *const T {
@@ -1266,6 +1268,8 @@ impl<T> MaybeUninit<T> {
12661268
/// let x_vec = unsafe { &mut *x.as_mut_ptr() };
12671269
/// // We have created a reference to an uninitialized vector! This is undefined behavior.
12681270
/// ```
1271+
/// (Notice that the rules around referenced to uninitialized data are not finalized yet, but
1272+
/// until they are, it is advisable to avoid them.)
12691273
#[unstable(feature = "maybe_uninit", issue = "53491")]
12701274
#[inline(always)]
12711275
pub fn as_mut_ptr(&mut self) -> *mut T {

0 commit comments

Comments
 (0)