mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-25 21:34:18 +00:00
Mentioned IntoIterator earlier in keyword 'for' docs
This commit is contained in:
parent
d7f9451634
commit
940ceb1a43
@ -473,8 +473,8 @@ mod fn_keyword {}
|
||||
/// * `for` is also used for [higher-ranked trait bounds] as in `for<'a> &'a T: PartialEq<i32>`.
|
||||
///
|
||||
/// for-in-loops, or to be more precise, iterator loops, are a simple syntactic sugar over a common
|
||||
/// practice within Rust, which is to loop over an iterator until that iterator returns `None` (or
|
||||
/// `break` is called).
|
||||
/// practice within Rust, which is to loop over anything that implements `IntoIterator` until the
|
||||
/// temporary iterator returns `None` (or `break` is called).
|
||||
///
|
||||
/// ```rust
|
||||
/// for i in 0..5 {
|
||||
|
Loading…
Reference in New Issue
Block a user