about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-28 22:22:21 +0100
committerGitHub <noreply@github.com>2022-12-28 22:22:21 +0100
commit89ccd704f04f86e70a58e8ae6867656503e4b89c (patch)
treeca63a7f825245e371065234fc7764f5d4658a72f
parentd28ef9dbf1e9bedd0a30ad96ead65d95aaa09ebb (diff)
parent37b88c842ab418df06ee7351f769ef01f5491260 (diff)
downloadrust-89ccd704f04f86e70a58e8ae6867656503e4b89c.tar.gz
rust-89ccd704f04f86e70a58e8ae6867656503e4b89c.zip
Rollup merge of #106161 - meithecatte:iter-find-position, r=Mark-Simulacrum
Iterator::find: link to Iterator::position in docs for discoverability
-rw-r--r--library/core/src/iter/traits/iterator.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index b4863bb2589..f9f24f68e38 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -2654,7 +2654,10 @@ pub trait Iterator {
     /// argument is a double reference. You can see this effect in the
     /// examples below, with `&&x`.
     ///
+    /// If you need the index of the element, see [`position()`].
+    ///
     /// [`Some(element)`]: Some
+    /// [`position()`]: Iterator::position
     ///
     /// # Examples
     ///