Skip to content

Commit 1b7b9ea

Browse files
Rollup merge of #160436 - edwloef:stabilize-box-take, r=Darksonn
stabilize `Box::take` Tracking issue: #147212 There hasn't been any activity on the tracking issue for a while, and this is a pretty small feature, so opening this to hopefully get a FCP started. Closes: #147212
2 parents bcf6cb7 + c918352 commit 1b7b9ea

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎library/alloc/src/boxed.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,6 @@ impl<T, A: Allocator> Box<T, A> {
668668
/// # Examples
669669
///
670670
/// ```
671-
/// #![feature(box_take)]
672-
///
673671
/// let c = Box::new(5);
674672
///
675673
/// // take the value out of the box
@@ -680,7 +678,7 @@ impl<T, A: Allocator> Box<T, A> {
680678
/// let c = Box::write(uninit, 6);
681679
/// assert_eq!(*c, 6);
682680
/// ```
683-
#[unstable(feature = "box_take", issue = "147212")]
681+
#[stable(feature = "box_take", since = "CURRENT_RUSTC_VERSION")]
684682
pub fn take(boxed: Self) -> (T, Box<mem::MaybeUninit<T>, A>) {
685683
// SAFETY: Reading out an initialised value & leaving behind a
686684
// box with uninit contents.

0 commit comments

Comments
 (0)