fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.9 KiB58 linesraw
1error[E0767]: use of unreachable label `'lab`
2  --> $DIR/break-outside-loop.rs:30:19
3   |
4LL |     'lab: loop {
5   |     ---- unreachable label defined here
6LL |         || {
7LL |             break 'lab;
8   |                   ^^^^ unreachable label `'lab`
9   |
10   = note: labels are unreachable through functions, closures, async blocks and modules
11
12error[E0268]: `break` outside of a loop or labeled block
13  --> $DIR/break-outside-loop.rs:10:15
14   |
15LL |     let pth = break;
16   |               ^^^^^ cannot `break` outside of a loop or labeled block
17
18error[E0268]: `continue` outside of a loop
19  --> $DIR/break-outside-loop.rs:11:17
20   |
21LL |     if cond() { continue }
22   |                 ^^^^^^^^ cannot `continue` outside of a loop
23
24error[E0267]: `break` inside of a closure
25  --> $DIR/break-outside-loop.rs:17:25
26   |
27LL |         foo(|| {
28   |             -- enclosing closure
29LL |             if cond() { break }
30   |                         ^^^^^ cannot `break` inside of a closure
31
32error[E0267]: `continue` inside of a closure
33  --> $DIR/break-outside-loop.rs:18:25
34   |
35LL |         foo(|| {
36   |             -- enclosing closure
37LL |             if cond() { break }
38LL |             if cond() { continue }
39   |                         ^^^^^^^^ cannot `continue` inside of a closure
40
41error[E0268]: `break` outside of a loop or labeled block
42  --> $DIR/break-outside-loop.rs:24:25
43   |
44LL |     let unconstrained = break;
45   |                         ^^^^^ cannot `break` outside of a loop or labeled block
46
47error[E0267]: `break` inside of a closure
48  --> $DIR/break-outside-loop.rs:30:13
49   |
50LL |         || {
51   |         -- enclosing closure
52LL |             break 'lab;
53   |             ^^^^^^^^^^ cannot `break` inside of a closure
54
55error: aborting due to 7 previous errors
56
57Some errors have detailed explanations: E0267, E0268, E0767.
58For more information about an error, try `rustc --explain E0267`.