]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/iter/traits/exact_size.rs
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / libcore / iter / traits / exact_size.rs
index 4a7db348b18516c51c51f64fd091e41da85ce35f..ad87d09588e3a217fbda625eced1c2493a9b3667 100644 (file)
 /// ```
 #[stable(feature = "rust1", since = "1.0.0")]
 pub trait ExactSizeIterator: Iterator {
-    /// Returns the exact number of times the iterator will iterate.
+    /// Returns the exact length of the iterator.
     ///
+    /// The implementation ensures that the iterator will return exactly `len()`
+    /// more times a `Some(T)` value, before returning `None`.
     /// This method has a default implementation, so you usually should not
     /// implement it directly. However, if you can provide a more efficient
     /// implementation, you can do so. See the [trait-level] docs for an