diff options
| author | Maja Kądziołka <maya@compilercrim.es> | 2022-12-26 22:49:22 +0100 |
|---|---|---|
| committer | Maja Kądziołka <maya@compilercrim.es> | 2022-12-26 22:49:22 +0100 |
| commit | 37b88c842ab418df06ee7351f769ef01f5491260 (patch) | |
| tree | c4188b28fd39dadad134e53117b61a81a0d8dda6 | |
| parent | 298d763fc0ac206cf3ae202459101e36a17071f7 (diff) | |
| download | rust-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.rs | 3 |
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 /// |
