Skip to content

Commit bec14aa

Browse files
committed
Stabilize BTree{Map,Set}::extract_if
1 parent c018ae5 commit bec14aa

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>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, R, F, A>
14411440
where
14421441
K: Ord,
@@ -1923,7 +1922,7 @@ impl<K, V> Default for Values<'_, K, V> {
19231922
}
19241923

19251924
/// An iterator produced by calling `extract_if` on BTreeMap.
1926-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1925+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19271926
#[must_use = "iterators are lazy and do nothing unless consumed"]
19281927
pub struct ExtractIf<
19291928
'a,
@@ -1956,7 +1955,7 @@ pub(super) struct ExtractIfInner<'a, K, V, R> {
19561955
range: R,
19571956
}
19581957

1959-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1958+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19601959
impl<K, V, R, F, A> fmt::Debug for ExtractIf<'_, K, V, R, F, A>
19611960
where
19621961
K: fmt::Debug,
@@ -1968,7 +1967,7 @@ where
19681967
}
19691968
}
19701969

1971-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1970+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
19721971
impl<K, V, R, F, A: Allocator + Clone> Iterator for ExtractIf<'_, K, V, R, F, A>
19731972
where
19741973
K: PartialOrd,
@@ -2042,7 +2041,7 @@ impl<'a, K, V, R> ExtractIfInner<'a, K, V, R> {
20422041
}
20432042
}
20442043

2045-
#[unstable(feature = "btree_extract_if", issue = "70530")]
2044+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
20462045
impl<K, V, R, F> FusedIterator for ExtractIf<'_, K, V, R, F>
20472046
where
20482047
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>(&mut self, range: R, pred: F) -> ExtractIf<'_, T, R, F, A>
12241223
where
12251224
T: Ord,
@@ -1554,7 +1553,7 @@ impl<'a, T, A: Allocator + Clone> IntoIterator for &'a BTreeSet<T, A> {
15541553
}
15551554

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

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

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

1605-
#[unstable(feature = "btree_extract_if", issue = "70530")]
1604+
#[stable(feature = "btree_extract_if", since = "CURRENT_RUSTC_VERSION")]
16061605
impl<T, R, F, A: Allocator + Clone> FusedIterator for ExtractIf<'_, T, R, F, A>
16071606
where
16081607
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)