]> git.lizzy.rs Git - rust.git/commitdiff
remark that the rules are unfinished
authorRalf Jung <post@ralfj.de>
Sun, 24 Feb 2019 11:25:46 +0000 (12:25 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 24 Feb 2019 11:25:46 +0000 (12:25 +0100)
src/libcore/mem.rs

index 30fa904101d277646040c5c3064e290f37905c52..d4d51f8eeb76ef575a4dcae2b09719499821e39c 100644 (file)
@@ -1230,6 +1230,8 @@ pub fn set(&mut self, val: T) -> &mut 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 @@ pub fn as_ptr(&self) -> *const 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 {