You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-06 22:45:40 +02:00
update break-continue.md (#2287)
Move the speak note about "loop" into the page which we actually talk about "loop". Also update the wording to make it more accurate. --------- Co-authored-by: Jason Lin <lxj@google.com>
This commit is contained in:
@ -27,3 +27,12 @@ fn main() {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
Note that `loop` is the only looping construct which can returns a non-trivial
|
||||
value. This is because it's guaranteed to only return at a `break` statement
|
||||
(unlike `while` and `for` loops, which can also return when the condition
|
||||
fails).
|
||||
|
||||
</details>
|
||||
|
Reference in New Issue
Block a user