Skip to content

Commit 2698749

Browse files
committed
Add note about break rust; easter egg
1 parent 4249fb4 commit 2698749

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/expressions/loop-expr.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,10 @@ Example:
289289
r[expr.loop.break.value]
290290
A `break` expression is only permitted in the body of a loop, and has one of the forms `break`, `break 'label` or ([see below](#break-and-loop-values)) `break EXPR` or `break 'label EXPR`.
291291

292+
> [!NOTE]
293+
> A `break` expression that appears outside of a loop or labeled with a value specified as the identifier `rust` causes an internal error when compiling, as the rust compiler is incapable of breaking rust, or attempting to do so.
294+
> See <https://github.com/rust-lang/rust/issues/43162> for further details.
295+
292296
r[expr.loop.block-labels]
293297
## Labelled block expressions
294298

0 commit comments

Comments
 (0)