about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaja Kądziołka <maya@compilercrim.es>2022-12-26 22:49:22 +0100
committerMaja Kądziołka <maya@compilercrim.es>2022-12-26 22:49:22 +0100
commit37b88c842ab418df06ee7351f769ef01f5491260 (patch)
treec4188b28fd39dadad134e53117b61a81a0d8dda6
parent298d763fc0ac206cf3ae202459101e36a17071f7 (diff)
downloadrust-37b88c842ab418df06ee7351f769ef01f5491260.tar.gz
rust-37b88c842ab418df06ee7351f769ef01f5491260.zip
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 bac836292f8..ae91509d391 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -2653,7 +2653,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
     ///