Skip to content

Commit 0920cbc

Browse files
committed
Stabilize BTree{Map,Set}::extract_if
1 parent 298016b commit 0920cbc

File tree

6 files changed

+10
-16
lines changed

6 files changed

+10
-16
lines changed

library/alloc/src/collections/btree/map.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,7 +1419,6 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
14191419
/// # Examples
14201420
///
14211421
/// ```
1422-
/// #![feature(btree_extract_if)]
14231422
/// use std::collections::BTreeMap;
14241423
///
14251424
/// // Splitting a map into even and odd keys, reusing the original map:
@@ -1436,7 +1435,7 @@ impl<K, V, A: Allocator + Clone> BTreeMap<K, V, A> {
14361435
/// assert_eq!(low.keys().copied().collect::<Vec<_>>(), [0, 1, 2, 3]);
14371436
/// assert_eq!(high.keys().copied().collect::<Vec<_>>(), [4, 5, 6, 7]);
14381437
/// ```
1439-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1438+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
14401439
pub fn extract_if<F, R, Q>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A>
14411440
where
14421441
K: Borrow<Q>,
@@ -1925,7 +1924,7 @@ impl<K, V> Default for Values<'_, K, V> {
19251924
}
19261925

19271926
/// An iterator produced by calling `extract_if` on BTreeMap.
1928-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1927+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19291928
#[must_use = "iterators are lazy and do nothing unless consumed"]
19301929
pub struct ExtractIf<
19311930
'a,
@@ -1958,7 +1957,7 @@ pub(super) struct ExtractIfInner<'a, K, V, R> {
19581957
range: R,
19591958
}
19601959

1961-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1960+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19621961
impl<K, V, R, F, A> fmt::Debug for ExtractIf<'_, K, V, R, F, A>
19631962
where
19641963
K: fmt::Debug,
@@ -1970,7 +1969,7 @@ where
19701969
}
19711970
}
19721971

1973-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1972+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19741973
impl<K, V, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, K, V, R, F, A>
19751974
where
19761975
K: PartialOrd,
@@ -2044,7 +2043,7 @@ impl<'a, K, V, R> ExtractIfInner<'a, K, V, R> {
20442043
}
20452044
}
20462045

2047-
#[unstable(feature = "btree_extract_if", issue = "70530")]
2046+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
20482047
impl<K, V, R, F> FusedIterator for ExtractIf<'_, K, V, R, F>
20492048
where
20502049
K: PartialOrd,

library/alloc/src/collections/btree/set.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,6 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
12021202
/// # Examples
12031203
///
12041204
/// ```
1205-
/// #![feature(btree_extract_if)]
12061205
/// use std::collections::BTreeSet;
12071206
///
12081207
/// // Splitting a set into even and odd values, reusing the original set:
@@ -1219,7 +1218,7 @@ impl<T, A: Allocator + Clone> BTreeSet<T, A> {
12191218
/// assert_eq!(low.into_iter().collect::<Vec<_>>(), [0, 1, 2, 3]);
12201219
/// assert_eq!(high.into_iter().collect::<Vec<_>>(), [4, 5, 6, 7]);
12211220
/// ```
1222-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1221+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
12231222
pub fn extract_if<F, R, Q>(&mut self, range: R, pred: F) -> ExtractIf<'_, T, R, F, A>
12241223
where
12251224
T: Borrow<Q>,
@@ -1555,7 +1554,7 @@ impl<'a, T, A: Allocator + Clone> IntoIterator for &'a BTreeSet<T, A> {
15551554
}
15561555

15571556
/// An iterator produced by calling `extract_if` on BTreeSet.
1558-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1557+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
15591558
#[must_use = "iterators are lazy and do nothing unless consumed"]
15601559
pub struct ExtractIf<
15611560
'a,
@@ -1570,7 +1569,7 @@ pub struct ExtractIf<
15701569
alloc: A,
15711570
}
15721571

1573-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1572+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
15741573
impl<T, R, F, A> fmt::Debug for ExtractIf<'_, T, R, F, A>
15751574
where
15761575
T: fmt::Debug,
@@ -1583,7 +1582,7 @@ where
15831582
}
15841583
}
15851584

1586-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1585+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
15871586
impl<T, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, T, R, F, A>
15881587
where
15891588
T: PartialOrd,
@@ -1603,7 +1602,7 @@ where
16031602
}
16041603
}
16051604

1606-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1605+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
16071606
impl<T, R, F, A: Allocator + Clone> FusedIterator for ExtractIf<'_, T, R, F, A>
16081607
where
16091608
T: PartialOrd,

library/alloctests/benches/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Disabling in Miri as these would take too long.
22
#![cfg(not(miri))]
3-
#![feature(btree_extract_if)]
43
#![feature(iter_next_chunk)]
54
#![feature(repr_simd)]
65
#![feature(slice_partition_dedup)]

library/alloctests/tests/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(alloc_layout_extra)]
33
#![feature(iter_array_chunks)]
44
#![feature(assert_matches)]
5-
#![feature(btree_extract_if)]
65
#![feature(char_max_len)]
76
#![feature(cow_is_borrowed)]
87
#![feature(core_intrinsics)]

src/tools/miri/tests/pass/btreemap.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
//@compile-flags: -Zmiri-strict-provenance
4-
#![feature(btree_extract_if)]
54
use std::collections::{BTreeMap, BTreeSet};
65
use std::mem;
76

tests/ui/closures/2229_closure_analysis/run_pass/lit-pattern-matching-with-methods.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//@check-pass
33
#![warn(unused)]
44
#![feature(rustc_attrs)]
5-
#![feature(btree_extract_if)]
65

76
use std::collections::BTreeMap;
87
use std::panic::{catch_unwind, AssertUnwindSafe};

0 commit comments

Comments
 (0)