1
Fork 0

Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, r=alexcrichton

Stabilise vec::remove_item

Closes #40062

r? @alexcrichton
This commit is contained in:
Yuki Okushi 2020-01-07 13:46:01 +09:00 committed by GitHub
commit 4ed415b547
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 6 deletions

View file

@ -11,7 +11,6 @@
#![feature(associated_type_bounds)] #![feature(associated_type_bounds)]
#![feature(binary_heap_into_iter_sorted)] #![feature(binary_heap_into_iter_sorted)]
#![feature(binary_heap_drain_sorted)] #![feature(binary_heap_drain_sorted)]
#![feature(vec_remove_item)]
use std::collections::hash_map::DefaultHasher; use std::collections::hash_map::DefaultHasher;
use std::hash::{Hash, Hasher}; use std::hash::{Hash, Hasher};

View file

@ -1696,14 +1696,13 @@ impl<T> Vec<T> {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// # #![feature(vec_remove_item)]
/// let mut vec = vec![1, 2, 3, 1]; /// let mut vec = vec![1, 2, 3, 1];
/// ///
/// vec.remove_item(&1); /// vec.remove_item(&1);
/// ///
/// assert_eq!(vec, vec![2, 3, 1]); /// assert_eq!(vec, vec![2, 3, 1]);
/// ``` /// ```
#[unstable(feature = "vec_remove_item", reason = "recently added", issue = "40062")] #[stable(feature = "vec_remove_item", since = "1.42.0")]
pub fn remove_item<V>(&mut self, item: &V) -> Option<T> pub fn remove_item<V>(&mut self, item: &V) -> Option<T>
where where
T: PartialEq<V>, T: PartialEq<V>,

View file

@ -50,7 +50,6 @@
#![feature(thread_local)] #![feature(thread_local)]
#![feature(trace_macros)] #![feature(trace_macros)]
#![feature(trusted_len)] #![feature(trusted_len)]
#![feature(vec_remove_item)]
#![feature(stmt_expr_attributes)] #![feature(stmt_expr_attributes)]
#![feature(integer_atomics)] #![feature(integer_atomics)]
#![feature(test)] #![feature(test)]

View file

@ -10,7 +10,6 @@
#![feature(nll)] #![feature(nll)]
#![feature(set_stdio)] #![feature(set_stdio)]
#![feature(test)] #![feature(test)]
#![feature(vec_remove_item)]
#![feature(ptr_offset_from)] #![feature(ptr_offset_from)]
#![feature(crate_visibility_modifier)] #![feature(crate_visibility_modifier)]
#![feature(const_fn)] #![feature(const_fn)]

View file

@ -1,6 +1,5 @@
#![crate_name = "compiletest"] #![crate_name = "compiletest"]
#![feature(test)] #![feature(test)]
#![feature(vec_remove_item)]
#![deny(warnings)] #![deny(warnings)]
extern crate test; extern crate test;