diff --git a/src/control-flow-basics/break-continue.md b/src/control-flow-basics/break-continue.md index e0ae4b88..57d1ec31 100644 --- a/src/control-flow-basics/break-continue.md +++ b/src/control-flow-basics/break-continue.md @@ -27,3 +27,12 @@ fn main() { } } ``` + +
+ +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). + +
diff --git a/src/control-flow-basics/break-continue/labels.md b/src/control-flow-basics/break-continue/labels.md index 27dbdd81..bff046fe 100644 --- a/src/control-flow-basics/break-continue/labels.md +++ b/src/control-flow-basics/break-continue/labels.md @@ -19,11 +19,3 @@ fn main() { print!("elements searched: {elements_searched}"); } ``` - -
- -- Note that `loop` is the only looping construct which returns a non-trivial - value. This is because it's guaranteed to be entered at least once (unlike - `while` and `for` loops). - -