2017-03-17 11:49:53 -04:00
|
|
|
error[E0571]: `break` with value from a `for` loop
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/loop-break-value-no-repeat.rs:12:9
|
2017-03-17 11:49:53 -04:00
|
|
|
|
|
2021-01-20 17:25:27 -08:00
|
|
|
LL | for _ in &[1,2,3] {
|
|
|
|
| ----------------- you can't `break` with a value in a `for` loop
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | break 22
|
2018-04-25 19:28:04 +02:00
|
|
|
| ^^^^^^^^ can only break with a value inside `loop` or breakable block
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2021-01-20 17:25:27 -08:00
|
|
|
help: use `break` on its own without a value inside this `for` loop
|
2018-01-28 11:14:09 -08:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | break
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~~~~
|
2017-03-17 11:49:53 -04:00
|
|
|
|
2017-07-02 13:49:30 +03:00
|
|
|
error: aborting due to previous error
|
2017-03-17 11:49:53 -04:00
|
|
|
|
2018-03-03 15:59:40 +01:00
|
|
|
For more information about this error, try `rustc --explain E0571`.
|