about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-11-23 15:46:56 +0000
committerbors <bors@rust-lang.org>2014-11-23 15:46:56 +0000
commit220b99b148559e8996a1dbd279e8ca190bf94b2e (patch)
tree82385731b5c6c17cc97b7a005875c868e7e63061 /src
parente197a2b0acd00fb158c5de67e241986237174734 (diff)
parentf85f971e4482a5f38d8b702ae9a93065e18446ef (diff)
auto merge of #19150 : Manishearth/rust/find-doc, r=Gankro
It's useful to know this (opens up a bunch of other opportunities especially whilst parsing)
Diffstat (limited to 'src')
-rw-r--r--src/libcore/iter.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs
index 3b62c8da1eb..02242492e34 100644
--- a/src/libcore/iter.rs
+++ b/src/libcore/iter.rs
@@ -548,7 +548,9 @@ pub trait Iterator<A> {
         false
     }
 
-    /// Return the first element satisfying the specified predicate
+    /// Returns the first element satisfying the specified predicate.
+    ///
+    /// Does not consume the iterator past the first found element.
     #[inline]
     fn find(&mut self, predicate: |&A| -> bool) -> Option<A> {
         for x in *self {