Skip to content

Add note about break rust; easter egg #1727

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/expressions/loop-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ Example:
r[expr.loop.break.value]
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`.

> [!NOTE]
> A `break` expression that appears outside of a loop or labeled block 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.
> See <https://github.com/rust-lang/rust/issues/43162> for further details.

r[expr.loop.block-labels]
## Labelled block expressions

Expand Down