rust/src/test/ui/break-outside-loop.stderr

35 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0268]: `break` outside of loop
2018-12-25 09:56:47 -06:00
--> $DIR/break-outside-loop.rs:10:15
2018-08-08 07:28:26 -05:00
|
LL | let pth = break; //~ ERROR: `break` outside of loop
| ^^^^^ cannot break outside of a loop
error[E0268]: `continue` outside of loop
2018-12-25 09:56:47 -06:00
--> $DIR/break-outside-loop.rs:11:17
2018-08-08 07:28:26 -05:00
|
LL | if cond() { continue } //~ ERROR: `continue` outside of loop
| ^^^^^^^^ cannot break outside of a loop
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
|
LL | if cond() { break } //~ ERROR: `break` inside of a closure
| ^^^^^ cannot break inside of a closure
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
|
LL | if cond() { continue } //~ ERROR: `continue` inside of a closure
| ^^^^^^^^ cannot break inside of a closure
error[E0268]: `break` outside of loop
2018-12-25 09:56:47 -06:00
--> $DIR/break-outside-loop.rs:24:25
2018-08-08 07:28:26 -05:00
|
LL | let unconstrained = break; //~ ERROR: `break` outside of loop
| ^^^^^ cannot break outside of a loop
error: aborting due to 5 previous errors
Some errors occurred: E0267, E0268.
For more information about an error, try `rustc --explain E0267`.