File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,15 @@ for var in expression {
80
80
}
81
81
```
82
82
83
- The expression is an [ iterator] [ iterator ] . The iterator gives back a series of
84
- elements. Each element is one iteration of the loop. That value is then bound
85
- to the name ` var ` , which is valid for the loop body. Once the body is over, the
86
- next value is fetched from the iterator, and we loop another time. When there
87
- are no more values, the ` for ` loop is over.
83
+ The expression is an item can can be converted into an [ iterator] using
84
+ [ ` IntoIterator ` ] . The iterator gives back a series of elements. Each element is
85
+ one iteration of the loop. That value is then bound to the name ` var ` , which is
86
+ valid for the loop body. Once the body is over, the next value is fetched from
87
+ the iterator, and we loop another time. When there are no more values, the ` for `
88
+ loop is over.
88
89
89
90
[ iterator ] : iterators.html
91
+ [ `IntoIterator` ] : ../std/iter/trait.IntoIterator.html
90
92
91
93
In our example, ` 0..10 ` is an expression that takes a start and an end position,
92
94
and gives an iterator over those values. The upper bound is exclusive, though,
You can’t perform that action at this time.
0 commit comments