Skip to content

Commit 06688db

Browse files
authored
Rollup merge of rust-lang#68089 - lzutao:revert-remote_item, r=sfackler
Unstabilize `Vec::remove_item` As concerned by @kornelski, @LukasKalbertodt, and @gnzlbg in rust-lang#40062. Reverts rust-lang#67727
2 parents 97c5332 + 7ba25ac commit 06688db

File tree

5 files changed

+6
-1
lines changed

5 files changed

+6
-1
lines changed

src/liballoc/tests/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#![feature(associated_type_bounds)]
1212
#![feature(binary_heap_into_iter_sorted)]
1313
#![feature(binary_heap_drain_sorted)]
14+
#![feature(vec_remove_item)]
1415

1516
use std::collections::hash_map::DefaultHasher;
1617
use std::hash::{Hash, Hasher};

src/liballoc/vec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1696,13 +1696,14 @@ impl<T> Vec<T> {
16961696
/// # Examples
16971697
///
16981698
/// ```
1699+
/// # #![feature(vec_remove_item)]
16991700
/// let mut vec = vec![1, 2, 3, 1];
17001701
///
17011702
/// vec.remove_item(&1);
17021703
///
17031704
/// assert_eq!(vec, vec![2, 3, 1]);
17041705
/// ```
1705-
#[stable(feature = "vec_remove_item", since = "1.42.0")]
1706+
#[unstable(feature = "vec_remove_item", reason = "recently added", issue = "40062")]
17061707
pub fn remove_item<V>(&mut self, item: &V) -> Option<T>
17071708
where
17081709
T: PartialEq<V>,

src/librustc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#![feature(thread_local)]
5050
#![feature(trace_macros)]
5151
#![feature(trusted_len)]
52+
#![feature(vec_remove_item)]
5253
#![feature(stmt_expr_attributes)]
5354
#![feature(integer_atomics)]
5455
#![feature(test)]

src/librustdoc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#![feature(nll)]
1111
#![feature(set_stdio)]
1212
#![feature(test)]
13+
#![feature(vec_remove_item)]
1314
#![feature(ptr_offset_from)]
1415
#![feature(crate_visibility_modifier)]
1516
#![feature(drain_filter)]

src/tools/compiletest/src/main.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![crate_name = "compiletest"]
2+
#![feature(vec_remove_item)]
23
#![deny(warnings)]
34
// The `test` crate is the only unstable feature
45
// allowed here, just to share similar code.

0 commit comments

Comments
 (0)