We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7972fbb commit 331821eCopy full SHA for 331821e
src/doc/reference.md
@@ -3192,7 +3192,7 @@ for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}'
3192
```
3193
3194
A `for` expression is a syntactic construct for looping over elements provided
3195
-by an implementation of `std::iter::Iterator`.
+by an implementation of `std::iter::IntoIterator`.
3196
3197
An example of a for loop over the contents of an array:
3198
@@ -3205,8 +3205,8 @@ An example of a for loop over the contents of an array:
3205
3206
let v: &[Foo] = &[a, b, c];
3207
3208
-for e in v.iter() {
3209
- bar(*e);
+for e in v {
+ bar(e);
3210
}
3211
3212
0 commit comments