@@ -668,6 +668,7 @@ impl<K, V, S> HashMap<K, V, S> {
668
668
/// Splitting a map into even and odd keys, reusing the original map:
669
669
///
670
670
/// ```
671
+ /// #![feature(hash_extract_if)]
671
672
/// use std::collections::HashMap;
672
673
///
673
674
/// let mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
@@ -683,7 +684,7 @@ impl<K, V, S> HashMap<K, V, S> {
683
684
/// ```
684
685
#[ inline]
685
686
#[ rustc_lint_query_instability]
686
- #[ stable ( feature = "hash_extract_if" , since = "1.87.0 " ) ]
687
+ #[ unstable ( feature = "hash_extract_if" , issue = "59618 " ) ]
687
688
pub fn extract_if < F > ( & mut self , pred : F ) -> ExtractIf < ' _ , K , V , F >
688
689
where
689
690
F : FnMut ( & K , & mut V ) -> bool ,
@@ -1670,14 +1671,16 @@ impl<'a, K, V> Drain<'a, K, V> {
1670
1671
/// # Example
1671
1672
///
1672
1673
/// ```
1674
+ /// #![feature(hash_extract_if)]
1675
+ ///
1673
1676
/// use std::collections::HashMap;
1674
1677
///
1675
1678
/// let mut map = HashMap::from([
1676
1679
/// ("a", 1),
1677
1680
/// ]);
1678
1681
/// let iter = map.extract_if(|_k, v| *v % 2 == 0);
1679
1682
/// ```
1680
- #[ stable ( feature = "hash_extract_if" , since = "1.87.0 " ) ]
1683
+ #[ unstable ( feature = "hash_extract_if" , issue = "59618 " ) ]
1681
1684
#[ must_use = "iterators are lazy and do nothing unless consumed" ]
1682
1685
pub struct ExtractIf < ' a , K , V , F >
1683
1686
where
@@ -2294,7 +2297,7 @@ where
2294
2297
}
2295
2298
}
2296
2299
2297
- #[ stable ( feature = "hash_extract_if" , since = "1.87.0 " ) ]
2300
+ #[ unstable ( feature = "hash_extract_if" , issue = "59618 " ) ]
2298
2301
impl < K , V , F > Iterator for ExtractIf < ' _ , K , V , F >
2299
2302
where
2300
2303
F : FnMut ( & K , & mut V ) -> bool ,
@@ -2311,10 +2314,10 @@ where
2311
2314
}
2312
2315
}
2313
2316
2314
- #[ stable ( feature = "hash_extract_if" , since = "1.87.0 " ) ]
2317
+ #[ unstable ( feature = "hash_extract_if" , issue = "59618 " ) ]
2315
2318
impl < K , V , F > FusedIterator for ExtractIf < ' _ , K , V , F > where F : FnMut ( & K , & mut V ) -> bool { }
2316
2319
2317
- #[ stable ( feature = "hash_extract_if" , since = "1.87.0 " ) ]
2320
+ #[ unstable ( feature = "hash_extract_if" , issue = "59618 " ) ]
2318
2321
impl < ' a , K , V , F > fmt:: Debug for ExtractIf < ' a , K , V , F >
2319
2322
where
2320
2323
F : FnMut ( & K , & mut V ) -> bool ,
0 commit comments