From 2ecb40e04a3ff8aeefc470598d8ea51edc197b26 Mon Sep 17 00:00:00 2001 From: Pavel Grigorenko Date: Tue, 14 Jan 2025 18:13:52 +0300 Subject: Stabilize `vec_pop_if` --- library/alloc/src/vec/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'library/alloc/src/vec') diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 88bd3f414ea..34aacd337b4 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -2518,8 +2518,6 @@ impl Vec { /// # Examples /// /// ``` - /// #![feature(vec_pop_if)] - /// /// let mut vec = vec![1, 2, 3, 4]; /// let pred = |x: &mut i32| *x % 2 == 0; /// @@ -2527,7 +2525,7 @@ impl Vec { /// assert_eq!(vec, [1, 2, 3]); /// assert_eq!(vec.pop_if(pred), None); /// ``` - #[unstable(feature = "vec_pop_if", issue = "122741")] + #[stable(feature = "vec_pop_if", since = "CURRENT_RUSTC_VERSION")] pub fn pop_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option { let last = self.last_mut()?; if predicate(last) { self.pop() } else { None } -- cgit 1.4.1-3-g733a5