2017-03-17 15:49:53 +00:00
|
|
|
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
|
2017-03-17 15:49:53 +00:00
|
|
|
|
|
2021-01-21 01:25:27 +00:00
|
|
|
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
|
2018-04-25 17:28:04 +00:00
|
|
|
| ^^^^^^^^ can only break with a value inside `loop` or breakable block
|
2019-10-24 05:20:58 +00:00
|
|
|
|
|
2021-01-21 01:25:27 +00:00
|
|
|
help: use `break` on its own without a value inside this `for` loop
|
2018-01-28 19:14:09 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | break
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~~~~
|
2017-03-17 15:49:53 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2017-03-17 15:49:53 +00:00
|
|
|
|
2018-03-03 14:59:40 +00:00
|
|
|
For more information about this error, try `rustc --explain E0571`.
|