mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Rollup merge of #122562 - Wilfred:break_keyword_docs, r=workingjubilee
Mention labelled blocks in `break` docs `break` doesn't require a loop, so note this in the docs. This is covered in the linked sections of the rust reference, but this page implied that `break` is only for loops.
This commit is contained in:
commit
1745f3d405
@ -48,7 +48,7 @@ mod as_keyword {}
|
||||
|
||||
#[doc(keyword = "break")]
|
||||
//
|
||||
/// Exit early from a loop.
|
||||
/// Exit early from a loop or labelled block.
|
||||
///
|
||||
/// When `break` is encountered, execution of the associated loop body is
|
||||
/// immediately terminated.
|
||||
|
Loading…
Reference in New Issue
Block a user