]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | // break and continue formatting |
2 | ||
3 | #![feature(loop_break_value)] | |
4 | ||
5 | fn main() { | |
6 | 'a: loop { | |
7 | break 'a; | |
8 | } | |
9 | ||
10 | let mut done = false; | |
11 | 'b: while !done { | |
12 | done = true; | |
13 | continue 'b; | |
14 | } | |
15 | ||
16 | let x = loop { | |
17 | break 5; | |
18 | }; | |
19 | ||
20 | let x = 'c: loop { | |
21 | break 'c 5; | |
22 | }; | |
23 | } |