about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-01-12 03:28:00 +0100
committerGitHub <noreply@github.com>2020-01-12 03:28:00 +0100
commitbbd210e6c57b23853889dddbdb1564c61a0249f7 (patch)
treead6aa97491e9f46eb87da562301c18119508b685 /src/liballoc
parentcc51d0350ec33b5c43a7785caa4ab9dcc4732617 (diff)
parent7ba25acd7a4a119fcfdb6beb58d3958647236b30 (diff)
downloadrust-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/liballoc')
-rw-r--r--src/liballoc/tests/lib.rs1
-rw-r--r--src/liballoc/vec.rs3
2 files changed, 3 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>,