@@ -333,25 +333,6 @@ mod range;
333333mod sources;
334334mod traits;
335335
336- // All adaptors that preserve the size of the wrapped iterator are fine
337- // Adaptors that may overflow in `size_hint` are not, i.e. `Chain`.
338- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
339- impl < I > ExactSizeIterator for Enumerate < I > where I : ExactSizeIterator { }
340- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
341- impl < I : ExactSizeIterator , F > ExactSizeIterator for Inspect < I , F > where
342- F : FnMut ( & I :: Item ) ,
343- { }
344- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
345- impl < I > ExactSizeIterator for Rev < I >
346- where I : ExactSizeIterator + DoubleEndedIterator { }
347- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
348- impl < B , I : ExactSizeIterator , F > ExactSizeIterator for Map < I , F > where
349- F : FnMut ( I :: Item ) -> B ,
350- { }
351- #[ stable( feature = "rust1" , since = "1.0.0" ) ]
352- impl < A , B > ExactSizeIterator for Zip < A , B >
353- where A : ExactSizeIterator , B : ExactSizeIterator { }
354-
355336/// An double-ended iterator with the direction inverted.
356337///
357338/// This `struct` is created by the [`rev()`] method on [`Iterator`]. See its
@@ -382,6 +363,10 @@ impl<I> DoubleEndedIterator for Rev<I> where I: DoubleEndedIterator {
382363 fn next_back ( & mut self ) -> Option < <I as Iterator >:: Item > { self . iter . next ( ) }
383364}
384365
366+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
367+ impl < I > ExactSizeIterator for Rev < I >
368+ where I : ExactSizeIterator + DoubleEndedIterator { }
369+
385370/// An iterator that clones the elements of an underlying iterator.
386371///
387372/// This `struct` is created by the [`cloned()`] method on [`Iterator`]. See its
@@ -679,6 +664,10 @@ impl<A, B> DoubleEndedIterator for Zip<A, B> where
679664 }
680665}
681666
667+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
668+ impl < A , B > ExactSizeIterator for Zip < A , B >
669+ where A : ExactSizeIterator , B : ExactSizeIterator { }
670+
682671/// An iterator that maps the values of `iter` with `f`.
683672///
684673/// This `struct` is created by the [`map()`] method on [`Iterator`]. See its
@@ -771,6 +760,10 @@ impl<B, I: DoubleEndedIterator, F> DoubleEndedIterator for Map<I, F> where
771760 }
772761}
773762
763+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
764+ impl < B , I : ExactSizeIterator , F > ExactSizeIterator for Map < I , F >
765+ where F : FnMut ( I :: Item ) -> B { }
766+
774767/// An iterator that filters the elements of `iter` with `predicate`.
775768///
776769/// This `struct` is created by the [`filter()`] method on [`Iterator`]. See its
@@ -966,6 +959,9 @@ impl<I> DoubleEndedIterator for Enumerate<I> where
966959 }
967960}
968961
962+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
963+ impl < I > ExactSizeIterator for Enumerate < I > where I : ExactSizeIterator { }
964+
969965/// An iterator with a `peek()` that returns an optional reference to the next
970966/// element.
971967///
@@ -1655,3 +1651,7 @@ impl<I: DoubleEndedIterator, F> DoubleEndedIterator for Inspect<I, F>
16551651 self . do_inspect ( next)
16561652 }
16571653}
1654+
1655+ #[ stable( feature = "rust1" , since = "1.0.0" ) ]
1656+ impl < I : ExactSizeIterator , F > ExactSizeIterator for Inspect < I , F >
1657+ where F : FnMut ( & I :: Item ) { }
0 commit comments