about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-02-24 12:25:46 +0100
committerRalf Jung <post@ralfj.de>2019-02-24 12:25:46 +0100
commita5e2d0c4e5f4afe1bd52ed0ebe0be03890d3af62 (patch)
tree74cced673a763aced8bf637bc73a898d5b3a5ed1
parent8ce9b8667ac831821729f11b1e7c685af1e9e21c (diff)
downloadrust-a5e2d0c4e5f4afe1bd52ed0ebe0be03890d3af62.tar.gz
rust-a5e2d0c4e5f4afe1bd52ed0ebe0be03890d3af62.zip
remark that the rules are unfinished
-rw-r--r--src/libcore/mem.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 30fa904101d..d4d51f8eeb7 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -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 {