Skip to content

Commit

Permalink
reworded loop value sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
dorfsmay committed Oct 19, 2019
1 parent 52c7713 commit 11214a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libstd/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ mod as_keyword { }
/// println!("Bye.");
///```
///
/// When associated with `loop`, but not with any other kind of loop expression,
/// `break` can return a value. When no value is specified, `break;` returns `()`.
/// When associated with `loop`, a break expression may be used to return a value from that loop.
/// This is only valid with `loop` and not with any other type of loop.
/// If no value is specified, `break;` returns `()`.
/// Every `break` within a loop must return the same type.
///
/// ```rust
Expand Down

0 comments on commit 11214a6

Please sign in to comment.