diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-01-12 03:28:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-12 03:28:00 +0100 |
| commit | bbd210e6c57b23853889dddbdb1564c61a0249f7 (patch) | |
| tree | ad6aa97491e9f46eb87da562301c18119508b685 /src | |
| parent | cc51d0350ec33b5c43a7785caa4ab9dcc4732617 (diff) | |
| parent | 7ba25acd7a4a119fcfdb6beb58d3958647236b30 (diff) | |
| download | rust-bbd210e6c57b23853889dddbdb1564c61a0249f7.tar.gz rust-bbd210e6c57b23853889dddbdb1564c61a0249f7.zip | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/liballoc/tests/lib.rs | 1 | ||||
| -rw-r--r-- | src/liballoc/vec.rs | 3 | ||||
| -rw-r--r-- | src/librustc/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 1 | ||||
| -rw-r--r-- | src/tools/compiletest/src/main.rs | 1 |
5 files changed, 6 insertions, 1 deletions
diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index 3fdee8bbfdf..c1ae67a1a33 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -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}; diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index f5f8d88829f..e9cbf627846 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -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>, diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 6d587e98540..2164a0b44bd 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -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)] diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 894cfefafaf..1da00e3a47b 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -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)] diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 0642823404a..efa9d05f16c 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -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. |
