Skip to content

Commit

Permalink
Mention labelled blocks in break docs
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
Wilfred committed Mar 15, 2024
1 parent c5b5713 commit e1e719e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e1e719e

Please sign in to comment.