rust/tests/ui/loops/loop-break-value-no-repeat.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
536 B
Plaintext
Raw Normal View History

error[E0571]: `break` with value from a `for` loop
2018-12-25 15:56:47 +00:00
--> $DIR/loop-break-value-no-repeat.rs:12:9
|
LL | for _ in &[1,2,3] {
| ----------------- you can't `break` with a value in a `for` loop
2019-03-09 12:03:44 +00:00
LL | break 22
| ^^^^^^^^ can only break with a value inside `loop` or breakable block
|
help: use `break` on its own without a value inside this `for` loop
|
2019-03-09 12:03:44 +00:00
LL | break
| ~~~~~
error: aborting due to 1 previous error
2018-03-03 14:59:40 +00:00
For more information about this error, try `rustc --explain E0571`.