RangeFull for-loop iteration fails because of IntoIterator

Saying that "[for-loop iteration] fails because .. has no IntoIterator
impl" is more direct than saying "...no Iterator impl" because for loops
sugar into IntoIterator invocations. It just happens that the other
Range* operators implement Iterator and rely on the fact that
`IntoIterator` is implemented for `T: Iterator`.
This commit is contained in:
Matthew Piziak 2016-08-16 06:54:45 -04:00
parent 377ae44cf2
commit c186da706d

View file

@ -1466,7 +1466,7 @@ pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
/// assert_eq!((..), std::ops::RangeFull);
///
/// // for i in .. {
/// // println!("This errors because .. has no Iterator impl");
/// // println!("This errors because .. has no IntoIterator impl");
/// // }
///
/// let arr = [0, 1, 2, 3];