From 467b5cfcb70c6a0f4b681f90219ce7d490980a47 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 10 Feb 2018 01:26:19 +0100 Subject: [PATCH 1/2] stabilize (version: 1.26.0) Box::leak, cc #46179 --- src/liballoc/boxed.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index cdaad973a71..a831391d168 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -381,8 +381,7 @@ impl Box { /// 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) -> &'a mut T where From 486160335c70c4a4b39ce8262314bc1bd63012ca Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 10 Feb 2018 01:39:22 +0100 Subject: [PATCH 2/2] stabilize Box::leak: remove #![feature(box_leak)] in docs --- src/liballoc/boxed.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index a831391d168..75a59de337c 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -359,8 +359,6 @@ impl Box { /// 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 Box { /// Unsized data: /// /// ``` - /// #![feature(box_leak)] - /// /// fn main() { /// let x = vec![1, 2, 3].into_boxed_slice(); /// let static_ref = Box::leak(x);