Skip to content

Commit 65b5e57

Browse files
committed
Make into itemized list and fix some wording
1 parent a68a0e3 commit 65b5e57

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/libstd/keyword_docs.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,16 @@ mod fn_keyword { }
286286
//
287287
/// The `for` keyword.
288288
///
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).
289+
/// The `for` keyword is used in many syntactic locations:
290+
///
291+
/// * `for` is used in for-in-loops (see below).
292+
/// * `for` is used when implementing traits as in `impl Trait for Type` (see [`impl`] for more info
293+
/// on that).
294+
/// * `for` is also used for [higher-ranked trait bounds] as in `for<'a> &'a T: PartialEq<i32>`.
295+
///
296+
/// for-in-loops, or to be more precise, iterator loops, are a simple syntactic sugar over a common
297+
/// practice within Rust, which is to loop over an iterator until that iterator returns `None` (or
298+
/// `break` is called).
296299
///
297300
/// ```rust
298301
/// for i in 0..5 {

0 commit comments

Comments
 (0)