summary refs log tree commit diff
path: root/src/test/ui/break-outside-loop.stderr
blob: 8e300fd848dab3d9357e896f1e4aa69746614cc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
error[E0268]: `break` outside of a loop
  --> $DIR/break-outside-loop.rs:10:15
   |
LL |     let pth = break;
   |               ^^^^^ cannot `break` outside of a loop

error[E0268]: `continue` outside of a loop
  --> $DIR/break-outside-loop.rs:11:17
   |
LL |     if cond() { continue }
   |                 ^^^^^^^^ cannot `continue` outside of a loop

error[E0267]: `break` inside of a closure
  --> $DIR/break-outside-loop.rs:17:25
   |
LL |         foo(|| {
   |             -- enclosing closure
LL |             if cond() { break }
   |                         ^^^^^ cannot `break` inside of a closure

error[E0267]: `continue` inside of a closure
  --> $DIR/break-outside-loop.rs:18:25
   |
LL |         foo(|| {
   |             -- enclosing closure
LL |             if cond() { break }
LL |             if cond() { continue }
   |                         ^^^^^^^^ cannot `continue` inside of a closure

error[E0268]: `break` outside of a loop
  --> $DIR/break-outside-loop.rs:24:25
   |
LL |     let unconstrained = break;
   |                         ^^^^^ cannot `break` outside of a loop

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

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0267, E0268.
For more information about an error, try `rustc --explain E0267`.