Skip to content

Commit 1745f3d

Browse files
authored
Rollup merge of rust-lang#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.
2 parents b482523 + e1e719e commit 1745f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/keyword_docs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ mod as_keyword {}
4848

4949
#[doc(keyword = "break")]
5050
//
51-
/// Exit early from a loop.
51+
/// Exit early from a loop or labelled block.
5252
///
5353
/// When `break` is encountered, execution of the associated loop body is
5454
/// immediately terminated.

0 commit comments

Comments
 (0)