Skip to content

Commit

Permalink
Auto merge of #64716 - jonhoo:stabilize-mem-take, r=SimonSapin
Browse files Browse the repository at this point in the history
Stabilize mem::take (mem_take)

Tracking issue: #61129

r? @matklad
  • Loading branch information
bors committed Oct 11, 2019
2 parents 000d90b + 45aca11 commit d4f7f97
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 18 deletions.
1 change: 0 additions & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
#![feature(maybe_uninit_extra, maybe_uninit_slice)]
#![feature(alloc_layout_extra)]
#![feature(try_trait)]
#![feature(mem_take)]
#![feature(associated_type_bounds)]

// Allow testing this library
Expand Down
1 change: 0 additions & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@
#![feature(adx_target_feature)]
#![feature(maybe_uninit_slice)]
#![feature(external_doc)]
#![feature(mem_take)]
#![feature(associated_type_bounds)]

#[prelude_import]
Expand Down
6 changes: 1 addition & 5 deletions src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
/// A simple example:
///
/// ```
/// #![feature(mem_take)]
///
/// use std::mem;
///
/// let mut v: Vec<i32> = vec![1, 2];
Expand Down Expand Up @@ -552,8 +550,6 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
/// `self`, allowing it to be returned:
///
/// ```
/// #![feature(mem_take)]
///
/// use std::mem;
///
/// # struct Buffer<T> { buf: Vec<T> }
Expand All @@ -572,7 +568,7 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
///
/// [`Clone`]: ../../std/clone/trait.Clone.html
#[inline]
#[unstable(feature = "mem_take", issue = "61129")]
#[stable(feature = "mem_take", since = "1.40.0")]
pub fn take<T: Default>(dest: &mut T) -> T {
replace(dest, T::default())
}
Expand Down
1 change: 0 additions & 1 deletion src/libproc_macro/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#![feature(extern_types)]
#![feature(in_band_lifetimes)]
#![feature(optin_builtin_traits)]
#![feature(mem_take)]
#![feature(non_exhaustive)]
#![feature(rustc_attrs)]
#![feature(specialization)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#![feature(crate_visibility_modifier)]
#![feature(proc_macro_hygiene)]
#![feature(log_syntax)]
#![feature(mem_take)]
#![feature(associated_type_bounds)]
#![feature(rustc_attrs)]

Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#![feature(link_args)]
#![feature(static_nobundle)]
#![feature(trusted_len)]
#![feature(mem_take)]

use back::write::{create_target_machine, create_informational_target_machine};
use syntax_pos::symbol::Symbol;
Expand Down
1 change: 0 additions & 1 deletion src/librustc_codegen_ssa/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#![feature(in_band_lifetimes)]
#![feature(nll)]
#![feature(trusted_len)]
#![feature(mem_take)]
#![feature(associated_type_bounds)]

#![recursion_limit="256"]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(slice_concat_ext)]
#![feature(trusted_len)]
#![feature(try_blocks)]
#![feature(mem_take)]
#![feature(associated_type_bounds)]
#![feature(range_is_empty)]
#![feature(stmt_expr_attributes)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_resolve/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#![feature(crate_visibility_modifier)]
#![feature(label_break_value)]
#![feature(mem_take)]
#![feature(nll)]

#![recursion_limit="256"]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_typeck/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ This API is completely unstable and subject to change.
#![feature(nll)]
#![feature(slice_patterns)]
#![feature(never_type)]
#![feature(mem_take)]

#![recursion_limit="256"]

Expand Down
1 change: 0 additions & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![feature(const_fn)]
#![feature(drain_filter)]
#![feature(never_type)]
#![feature(mem_take)]
#![feature(unicode_internals)]

#![recursion_limit="256"]
Expand Down
1 change: 0 additions & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@
#![feature(log_syntax)]
#![feature(maybe_uninit_ref)]
#![feature(maybe_uninit_slice)]
#![feature(mem_take)]
#![feature(needs_panic_runtime)]
#![feature(never_type)]
#![feature(nll)]
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#![feature(const_transmute)]
#![feature(crate_visibility_modifier)]
#![feature(label_break_value)]
#![feature(mem_take)]
#![feature(nll)]
#![feature(proc_macro_diagnostic)]
#![feature(proc_macro_internals)]
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax_ext/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#![feature(crate_visibility_modifier)]
#![feature(decl_macro)]
#![feature(mem_take)]
#![feature(nll)]
#![feature(proc_macro_internals)]
#![feature(proc_macro_quote)]
Expand Down

0 comments on commit d4f7f97

Please sign in to comment.