Skip to content

Commit b7ea4b7

Browse files
Rollup merge of rust-lang#154520 - GrigorenkoPV:doc/extract_if, r=JohnTitor
Add doc links to `ExtractIf` of `BTree{Set,Map}` and `LinkedList` There were links for `Hash{Set,Map}` and `Vec{,Deque}` versions, but not these three.
2 parents e32b188 + 18a3bda commit b7ea4b7

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,9 @@ impl<K, V> Default for Values<'_, K, V> {
21022102
}
21032103
}
21042104

2105-
/// An iterator produced by calling `extract_if` on BTreeMap.
2105+
/// This `struct` is created by the [`extract_if`] method on [`BTreeMap`].
2106+
///
2107+
/// [`extract_if`]: BTreeMap::extract_if
21062108
#[stable(feature = "btree_extract_if", since = "1.91.0")]
21072109
#[must_use = "iterators are lazy and do nothing unless consumed; \
21082110
use `retain` or `extract_if().for_each(drop)` to remove and discard elements"]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,9 @@ impl<'a, T, A: Allocator + Clone> IntoIterator for &'a BTreeSet<T, A> {
15471547
}
15481548
}
15491549

1550-
/// An iterator produced by calling `extract_if` on BTreeSet.
1550+
/// This `struct` is created by the [`extract_if`] method on [`BTreeSet`].
1551+
///
1552+
/// [`extract_if`]: BTreeSet::extract_if
15511553
#[stable(feature = "btree_extract_if", since = "1.91.0")]
15521554
#[must_use = "iterators are lazy and do nothing unless consumed; \
15531555
use `retain` or `extract_if().for_each(drop)` to remove and discard elements"]

library/alloc/src/collections/linked_list.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1942,7 +1942,9 @@ impl<'a, T, A: Allocator> CursorMut<'a, T, A> {
19421942
}
19431943
}
19441944

1945-
/// An iterator produced by calling `extract_if` on LinkedList.
1945+
/// This `struct` is created by the [`extract_if`] method on [`LinkedList`].
1946+
///
1947+
/// [`extract_if`]: LinkedList::extract_if
19461948
#[stable(feature = "extract_if", since = "1.87.0")]
19471949
#[must_use = "iterators are lazy and do nothing unless consumed; \
19481950
use `extract_if().for_each(drop)` to remove and discard elements"]

0 commit comments

Comments
 (0)