about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-12-22 19:50:21 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-01-20 11:09:23 +0100
commit55c50cd8ac5ed5a799bc9f5aa1fe8fcfbb956706 (patch)
treedf55f9b19b89d7b1e06a8fc7abdf002ed8d60da6 /src/liballoc
parent2d51e7458037187eb789caacf3180c14f3d84614 (diff)
downloadrust-55c50cd8ac5ed5a799bc9f5aa1fe8fcfbb956706.tar.gz
rust-55c50cd8ac5ed5a799bc9f5aa1fe8fcfbb956706.zip
Stabilize std::ptr::NonNull
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs10
-rw-r--r--src/liballoc/lib.rs1
2 files changed, 2 insertions, 9 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index 994466e2249..e7bc10dfaa9 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -288,16 +288,13 @@ impl<T: ?Sized> Box<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(nonnull)]
-    ///
     /// fn main() {
     ///     let x = Box::new(5);
     ///     let ptr = Box::into_nonnull_raw(x);
     ///     let x = unsafe { Box::from_nonnull_raw(ptr) };
     /// }
     /// ```
-    #[unstable(feature = "nonnull", reason = "needs an RFC to flesh out design",
-               issue = "27730")]
+    #[stable(feature = "nonnull", since = "1.24.0")]
     #[inline]
     pub unsafe fn from_nonnull_raw(u: NonNull<T>) -> Self {
         Box(u.into())
@@ -352,15 +349,12 @@ impl<T: ?Sized> Box<T> {
     /// # Examples
     ///
     /// ```
-    /// #![feature(nonnull)]
-    ///
     /// fn main() {
     ///     let x = Box::new(5);
     ///     let ptr = Box::into_nonnull_raw(x);
     /// }
     /// ```
-    #[unstable(feature = "nonnull", reason = "needs an RFC to flesh out design",
-               issue = "27730")]
+    #[stable(feature = "nonnull", since = "1.24.0")]
     #[inline]
     pub fn into_nonnull_raw(b: Box<T>) -> NonNull<T> {
         Box::into_unique(b).into()
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 07e4ccc45a9..f25b455f915 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -103,7 +103,6 @@
 #![feature(iter_rfold)]
 #![feature(lang_items)]
 #![feature(needs_allocator)]
-#![feature(nonnull)]
 #![feature(nonzero)]
 #![feature(offset_to)]
 #![feature(optin_builtin_traits)]