blob: 7dbff2d41245849bcc5ab67ce75e8e9590849035 [file] [log] [blame] [edit]
error[E0767]: use of unreachable label `'lab`
--> $DIR/break-outside-loop.rs:46: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
error[E0268]: `break` outside of a loop or labeled block
--> $DIR/break-outside-loop.rs:16:15
|
LL | let pth = break;
| ^^^^^ cannot `break` outside of a loop or labeled block
error[E0268]: `continue` outside of a loop
--> $DIR/break-outside-loop.rs:18:9
|
LL | continue;
| ^^^^^^^^ cannot `continue` outside of a loop
error[E0267]: `break` inside of a closure
--> $DIR/break-outside-loop.rs:30:17
|
LL | foo(|| {
| -- enclosing closure
LL | if cond() {
LL | break;
| ^^^^^ cannot `break` inside of a closure
error[E0267]: `continue` inside of a closure
--> $DIR/break-outside-loop.rs:33:17
|
LL | foo(|| {
| -- enclosing closure
...
LL | continue;
| ^^^^^^^^ cannot `continue` inside of a closure
error[E0268]: `break` outside of a loop or labeled block
--> $DIR/break-outside-loop.rs:40:25
|
LL | let unconstrained = break;
| ^^^^^ cannot `break` outside of a loop or labeled block
error[E0267]: `break` inside of a closure
--> $DIR/break-outside-loop.rs:46:13
|
LL | || {
| -- enclosing closure
LL | break 'lab;
| ^^^^^^^^^^ cannot `break` inside of a closure
error[E0268]: `continue` outside of a loop
--> $DIR/break-outside-loop.rs:53:5
|
LL | continue
| ^^^^^^^^ cannot `continue` outside of a loop
error[E0268]: `break` outside of a loop or labeled block
--> $DIR/break-outside-loop.rs:55:5
|
LL | break
| ^^^^^ cannot `break` outside of a loop or labeled block
error: aborting due to 9 previous errors
Some errors have detailed explanations: E0267, E0268, E0767.
For more information about an error, try `rustc --explain E0267`.