]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/break-and-continue.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / rustfmt / tests / source / break-and-continue.rs
CommitLineData
f20569fa
XL
1// break and continue formatting
2
3#![feature(loop_break_value)]
4
5fn 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}