File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -286,11 +286,13 @@ mod fn_keyword { }
286
286
//
287
287
/// The `for` keyword.
288
288
///
289
- /// `for` is primarily used in for-in-loops, but it has a few other pieces of syntactic uses such as
290
- /// `impl Trait for Type` (see [`impl`] for more info on that). for-in-loops, or to be more
291
- /// precise, iterator loops, are a simple syntactic sugar over an exceedingly common practice
292
- /// within Rust, which is to loop over an iterator until that iterator returns `None` (or `break`
293
- /// is called).
289
+ /// `for` is primarily used in for-in-loops, but it has a few other pieces of syntactic
290
+ /// uses. `for` is used when implementing traits as in `impl Trait for Type` (see
291
+ /// [`impl`] for more info on that). `for` is also used for [higher-ranked trait bounds]
292
+ /// as in `for<'a> &'a T: PartialEq<i32>`. for-in-loops, or to be more precise, iterator
293
+ /// loops, are a simple syntactic sugar over an exceedingly common practice within Rust,
294
+ /// which is to loop over an iterator until that iterator returns `None` (or `break` is
295
+ /// called).
294
296
///
295
297
/// ```rust
296
298
/// for i in 0..5 {
You can’t perform that action at this time.
0 commit comments