Skip to content

Document breaking out of a named code block #140197

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

Merged
merged 2 commits into from
May 2, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Simplify docs for breaking out of a named code block
  • Loading branch information
ktnlvr committed May 1, 2025
commit 175f71750f149643cff56f88b6f7e63c88843dea
4 changes: 2 additions & 2 deletions library/std/src/keyword_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ mod as_keyword {}
///
/// When associated with `loop`, a break expression may be used to return a value from that loop.
/// This is only valid with `loop` and not with any other type of loop.
/// If no value is specified, `break;` returns `()`.
/// If no value is specified for `break;` it returns `()`.
/// Every `break` within a loop must return the same type.
///
/// ```rust
Expand All @@ -110,7 +110,7 @@ mod as_keyword {}
/// ```
///
/// It is also possible to exit from any *labelled* block returning the value early.
/// If no value specified `break;` returns `()`.
/// If no value is specified for `break;` it returns `()`.
///
/// ```rust
/// let inputs = vec!["Cow", "Cat", "Dog", "Snake", "Cod"];
Expand Down
Loading