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:
Matthias Krüger 2024-03-15 21:51:58 +01:00 committed by GitHub
commit 1745f3d405
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ mod as_keyword {}
#[doc(keyword = "break")] #[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 /// When `break` is encountered, execution of the associated loop body is
/// immediately terminated. /// immediately terminated.