From 37b88c842ab418df06ee7351f769ef01f5491260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maja=20K=C4=85dzio=C5=82ka?= Date: Mon, 26 Dec 2022 22:49:22 +0100 Subject: [PATCH] Iterator::find: link to Iterator::position in docs for discoverability --- library/core/src/iter/traits/iterator.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs index bac836292f8fa..ae91509d391df 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 ///