about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-02-24 15:52:04 -0800
committerGitHub <noreply@github.com>2018-02-24 15:52:04 -0800
commitdd890d80a08867e15b4b892ed4f6fff457d15dad (patch)
treefce06d31270ac01f0a2ced97b0ff42e1604d2eaa /src/liballoc
parentedfdfc2483d002d90c753aa2f38a78df48b588dd (diff)
parent486160335c70c4a4b39ce8262314bc1bd63012ca (diff)
downloadrust-dd890d80a08867e15b4b892ed4f6fff457d15dad.tar.gz
rust-dd890d80a08867e15b4b892ed4f6fff457d15dad.zip
Rollup merge of #48110 - Centril:stabilize/box_leak, r=alexcrichton
Stabilize Box::leak

Stabilizes the following:
+ `Box::leak` (`box_leak`, in nightly since 2017-11-23)

cc #46179

 r? @rust-lang/libs
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/boxed.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs
index cdaad973a71..75a59de337c 100644
--- a/src/liballoc/boxed.rs
+++ b/src/liballoc/boxed.rs
@@ -359,8 +359,6 @@ impl<T: ?Sized> Box<T> {
     /// Simple usage:
     ///
     /// ```
-    /// #![feature(box_leak)]
-    ///
     /// fn main() {
     ///     let x = Box::new(41);
     ///     let static_ref: &'static mut usize = Box::leak(x);
@@ -372,8 +370,6 @@ impl<T: ?Sized> Box<T> {
     /// Unsized data:
     ///
     /// ```
-    /// #![feature(box_leak)]
-    ///
     /// fn main() {
     ///     let x = vec![1, 2, 3].into_boxed_slice();
     ///     let static_ref = Box::leak(x);
@@ -381,8 +377,7 @@ impl<T: ?Sized> Box<T> {
     ///     assert_eq!(*static_ref, [4, 2, 3]);
     /// }
     /// ```
-    #[unstable(feature = "box_leak", reason = "needs an FCP to stabilize",
-               issue = "46179")]
+    #[stable(feature = "box_leak", since = "1.26.0")]
     #[inline]
     pub fn leak<'a>(b: Box<T>) -> &'a mut T
     where