Rollup merge of #68089 - lzutao:revert-remote_item, r=sfackler

Unstabilize `Vec::remove_item`

As concerned by @kornelski, @LukasKalbertodt, and @gnzlbg in #40062.
Reverts #67727
This commit is contained in:
Mazdak Farrokhzad 2020-01-12 03:28:00 +01:00 committed by GitHub
commit bbd210e6c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,5 @@
#![crate_name = "compiletest"]
#![feature(vec_remove_item)]
#![deny(warnings)]
// The `test` crate is the only unstable feature
// allowed here, just to share similar code.