diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs index 36645a555bba..d3b2325fd9dd 100644 --- a/src/libstd/iterator.rs +++ b/src/libstd/iterator.rs @@ -29,7 +29,7 @@ use uint; /// Conversion from an `Iterator` pub trait FromIterator> { /// Build a container with elements from an external iterator. - pub fn from_iterator(iterator: &mut T) -> Self; + fn from_iterator(iterator: &mut T) -> Self; } /// An interface for dealing with "external iterators". These types of iterators @@ -52,7 +52,9 @@ pub trait DoubleEndedIterator: Iterator { } /// An object implementing random access indexing by `uint` -pub trait RandomAccessIterator { +/// +/// A `RandomAccessIterator` should be either infinite or a `DoubleEndedIterator`. +pub trait RandomAccessIterator: Iterator { /// Return the number of indexable elements. At most `std::uint::max_value` /// elements are indexable, even if the iterator represents a longer range. fn indexable(&self) -> uint;