Skip to content

Conversation

Wilfred
Copy link
Contributor

@Wilfred Wilfred commented Mar 15, 2024

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.

`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.
@rustbot
Copy link
Collaborator

rustbot commented Mar 15, 2024

r? @workingjubilee

rustbot has assigned @workingjubilee.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Mar 15, 2024
@workingjubilee
Copy link
Member

Apparently we call them "breakable expressions": https://doc.rust-lang.org/reference/expressions/loop-expr.html

Amusing.

@workingjubilee
Copy link
Member

I get a vague feeling some of the docs should be reviewed in light of that fact I noted, but this is a fine improvement.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 15, 2024

📌 Commit e1e719e has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 15, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 15, 2024
…ingjubilee

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.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#122254 (Detect calls to .clone() on T: !Clone types on borrowck errors)
 - rust-lang#122495 (Visually mark 👻hidden👻 items with document-hidden-items)
 - rust-lang#122543 (Add `#![rustc_never_type_mode = "..."]` crate-level attribute to allow experimenting)
 - rust-lang#122560 (Safe Transmute: Use 'not yet supported', not 'unspecified' in errors)
 - rust-lang#122562 (Mention labelled blocks in `break` docs)
 - rust-lang#122563 (CI: cache PR CI Docker builds)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1745f3d into rust-lang:master Mar 15, 2024
@rustbot rustbot added this to the 1.78.0 milestone Mar 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2024
Rollup merge of rust-lang#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.
@Wilfred Wilfred deleted the break_keyword_docs branch March 25, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants