Skip to content

Commit af788b4

Browse files
committed
Stabilize vec_pop_if
1 parent cf546c8 commit af788b4

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

Diff for: alloc/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@
155155
#![feature(unicode_internals)]
156156
#![feature(unsize)]
157157
#![feature(unwrap_infallible)]
158-
#![feature(vec_pop_if)]
159158
// tidy-alphabetical-end
160159
//
161160
// Language features:

Diff for: alloc/src/vec/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -2518,16 +2518,14 @@ impl<T, A: Allocator> Vec<T, A> {
25182518
/// # Examples
25192519
///
25202520
/// ```
2521-
/// #![feature(vec_pop_if)]
2522-
///
25232521
/// let mut vec = vec![1, 2, 3, 4];
25242522
/// let pred = |x: &mut i32| *x % 2 == 0;
25252523
///
25262524
/// assert_eq!(vec.pop_if(pred), Some(4));
25272525
/// assert_eq!(vec, [1, 2, 3]);
25282526
/// assert_eq!(vec.pop_if(pred), None);
25292527
/// ```
2530-
#[unstable(feature = "vec_pop_if", issue = "122741")]
2528+
#[stable(feature = "vec_pop_if", since = "CURRENT_RUSTC_VERSION")]
25312529
pub fn pop_if(&mut self, predicate: impl FnOnce(&mut T) -> bool) -> Option<T> {
25322530
let last = self.last_mut()?;
25332531
if predicate(last) { self.pop() } else { None }

Diff for: alloc/tests/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#![feature(local_waker)]
3838
#![feature(str_as_str)]
3939
#![feature(strict_provenance_lints)]
40-
#![feature(vec_pop_if)]
4140
#![feature(vec_deque_pop_if)]
4241
#![feature(unique_rc_arc)]
4342
#![feature(macro_metavar_expr_concat)]

0 commit comments

Comments
 (0)