2020-06-25 09:16:38 -05:00
|
|
|
error[E0767]: use of unreachable label `'lab`
|
|
|
|
--> $DIR/break-outside-loop.rs:30:19
|
|
|
|
|
|
|
|
|
LL | 'lab: loop {
|
|
|
|
| ---- unreachable label defined here
|
|
|
|
LL | || {
|
|
|
|
LL | break 'lab;
|
|
|
|
| ^^^^ unreachable label `'lab`
|
|
|
|
|
|
|
|
|
= note: labels are unreachable through functions, closures, async blocks and modules
|
|
|
|
|
2019-08-21 05:17:59 -05:00
|
|
|
error[E0268]: `break` outside of a loop
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/break-outside-loop.rs:10:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let pth = break;
|
2019-08-21 05:17:59 -05:00
|
|
|
| ^^^^^ cannot `break` outside of a loop
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-08-21 05:17:59 -05:00
|
|
|
error[E0268]: `continue` outside of a loop
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/break-outside-loop.rs:11:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if cond() { continue }
|
2019-08-21 05:17:59 -05:00
|
|
|
| ^^^^^^^^ cannot `continue` outside of a loop
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0267]: `break` inside of a closure
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/break-outside-loop.rs:17:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-08-21 05:17:59 -05:00
|
|
|
LL | foo(|| {
|
|
|
|
| -- enclosing closure
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if cond() { break }
|
2019-08-21 05:17:59 -05:00
|
|
|
| ^^^^^ cannot `break` inside of a closure
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0267]: `continue` inside of a closure
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/break-outside-loop.rs:18:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-08-21 05:17:59 -05:00
|
|
|
LL | foo(|| {
|
|
|
|
| -- enclosing closure
|
|
|
|
LL | if cond() { break }
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | if cond() { continue }
|
2019-08-21 05:17:59 -05:00
|
|
|
| ^^^^^^^^ cannot `continue` inside of a closure
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-08-21 05:17:59 -05:00
|
|
|
error[E0268]: `break` outside of a loop
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/break-outside-loop.rs:24:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let unconstrained = break;
|
2019-08-21 05:17:59 -05:00
|
|
|
| ^^^^^ cannot `break` outside of a loop
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-10-17 15:16:24 -05:00
|
|
|
error[E0267]: `break` inside of a closure
|
|
|
|
--> $DIR/break-outside-loop.rs:30:13
|
|
|
|
|
|
|
|
|
LL | || {
|
|
|
|
| -- enclosing closure
|
|
|
|
LL | break 'lab;
|
|
|
|
| ^^^^^^^^^^ cannot `break` inside of a closure
|
|
|
|
|
2020-06-25 09:16:38 -05:00
|
|
|
error: aborting due to 7 previous errors
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2020-06-25 09:16:38 -05:00
|
|
|
Some errors have detailed explanations: E0267, E0268, E0767.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0267`.
|