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:
Wilfred Hughes 2024-03-15 10:51:41 -07:00
parent c5b571310d
commit e1e719e1a1

View File

@ -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.