From c186da706dda6ddaa4df20691702249c4ef0d2dc Mon Sep 17 00:00:00 2001 From: Matthew Piziak Date: Tue, 16 Aug 2016 06:54:45 -0400 Subject: [PATCH] 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`. --- src/libcore/ops.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 558b78a2fbfa..cee374ccc7bc 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -1466,7 +1466,7 @@ pub trait IndexMut: Index { /// 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];