Stabilize btree_range, closes #27787
This commit is contained in:
parent
10510aefb1
commit
37b38a2f75
|
@ -724,8 +724,6 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
|||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(btree_range, collections_bound)]
|
||||
///
|
||||
/// use std::collections::BTreeMap;
|
||||
/// use std::collections::Bound::Included;
|
||||
///
|
||||
|
@ -738,9 +736,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
|||
/// }
|
||||
/// assert_eq!(Some((&5, &"b")), map.range(4..).next());
|
||||
/// ```
|
||||
#[unstable(feature = "btree_range",
|
||||
reason = "matches collection reform specification, waiting for dust to settle",
|
||||
issue = "27787")]
|
||||
#[stable(feature = "btree_range", since = "1.17.0")]
|
||||
pub fn range<T: ?Sized, R>(&self, range: R) -> Range<K, V>
|
||||
where T: Ord, K: Borrow<T>, R: RangeArgument<T>
|
||||
{
|
||||
|
@ -768,8 +764,6 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
|||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(btree_range)]
|
||||
///
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
/// let mut map: BTreeMap<&str, i32> = ["Alice", "Bob", "Carol", "Cheryl"].iter()
|
||||
|
@ -782,9 +776,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
|
|||
/// println!("{} => {}", name, balance);
|
||||
/// }
|
||||
/// ```
|
||||
#[unstable(feature = "btree_range",
|
||||
reason = "matches collection reform specification, waiting for dust to settle",
|
||||
issue = "27787")]
|
||||
#[stable(feature = "btree_range", since = "1.17.0")]
|
||||
pub fn range_mut<T: ?Sized, R>(&mut self, range: R) -> RangeMut<K, V>
|
||||
where T: Ord, K: Borrow<T>, R: RangeArgument<T>
|
||||
{
|
||||
|
|
|
@ -129,7 +129,7 @@ mod std {
|
|||
}
|
||||
|
||||
/// An endpoint of a range of keys.
|
||||
#[unstable(feature = "collections_bound", issue = "27787")]
|
||||
#[stable(feature = "collections_bound", since = "1.17.0")]
|
||||
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
|
||||
pub enum Bound<T> {
|
||||
/// An inclusive bound.
|
||||
|
|
Loading…
Reference in New Issue