merge privacy/privacy-sanity-2 with privacy/privacy-sanity.rs Add comment to generics/type-args-on-module-in-bound.rs Add comment to array-slice-vec/closure-in-array-eln.rs Add comment to array-slice-vec/return-in-array-len.rs Merge for-loop-while/break-outside-loop-2.rs with for-loop-while/break-outside-loop.rs Add comment to macros/column-macro-collision.rs Add comment to privacy/private-extern-fn-visibility.rs Add comment to mismatched_types/vec-hashset-type-mismatch.rs Merge std-sync-right-kind-impls-2.rs with std-sync-right-kind-impls.rs Add comment to array-slice-vec/slice-of-multi-ref.rs Add comment to mismatched_types\vec-hashset-type-mismatch.rs Add comment to derives/derive-hygiene-struct-builder.rs Add comment to label/undeclared-label-span.rs Add comment to label\undeclared-label-span.rs Add comment to mismatched_types/array-repeat-unit-struct.rs
71 lines
2.2 KiB
Text
71 lines
2.2 KiB
Text
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`.
|