about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-15 21:51:58 +0100
committerGitHub <noreply@github.com>2024-03-15 21:51:58 +0100
commit1745f3d4053eecba00d2d9a5966afb640313677d (patch)
tree5e1560f5222eb398eddb4a69465770f6b22d0ff0
parentb482523607cdc3b55efdb16d6968124c5e4b693a (diff)
parente1e719e1a1916dee9365c390dcb640390433d078 (diff)
downloadrust-1745f3d4053eecba00d2d9a5966afb640313677d.tar.gz
rust-1745f3d4053eecba00d2d9a5966afb640313677d.zip
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.
-rw-r--r--library/std/src/keyword_docs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs
index 873bfb6218b..8415f36eba2 100644
--- a/library/std/src/keyword_docs.rs
+++ b/library/std/src/keyword_docs.rs
@@ -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.