Auto merge of #64716 - jonhoo:stabilize-mem-take, r=SimonSapin
Stabilize mem::take (mem_take) Tracking issue: https://github.com/rust-lang/rust/issues/61129 r? @matklad
This commit is contained in:
commit
d4f7f974b8
14 changed files with 1 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -127,7 +127,6 @@
|
|||
#![feature(adx_target_feature)]
|
||||
#![feature(maybe_uninit_slice)]
|
||||
#![feature(external_doc)]
|
||||
#![feature(mem_take)]
|
||||
#![feature(associated_type_bounds)]
|
||||
|
||||
#[prelude_import]
|
||||
|
|
|
@ -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];
|
||||
|
@ -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> }
|
||||
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#![feature(in_band_lifetimes)]
|
||||
#![feature(nll)]
|
||||
#![feature(trusted_len)]
|
||||
#![feature(mem_take)]
|
||||
#![feature(associated_type_bounds)]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(label_break_value)]
|
||||
#![feature(mem_take)]
|
||||
#![feature(nll)]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
|
|
@ -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"]
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#![feature(const_fn)]
|
||||
#![feature(drain_filter)]
|
||||
#![feature(never_type)]
|
||||
#![feature(mem_take)]
|
||||
#![feature(unicode_internals)]
|
||||
|
||||
#![recursion_limit="256"]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(decl_macro)]
|
||||
#![feature(mem_take)]
|
||||
#![feature(nll)]
|
||||
#![feature(proc_macro_internals)]
|
||||
#![feature(proc_macro_quote)]
|
||||
|
|
Loading…
Add table
Reference in a new issue