mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
24 lines
310 B
Rust
24 lines
310 B
Rust
// break and continue formatting
|
|
|
|
#![feature(loop_break_value)]
|
|
|
|
fn main() {
|
|
'a: loop {
|
|
break 'a;
|
|
}
|
|
|
|
let mut done = false;
|
|
'b: while !done {
|
|
done = true;
|
|
continue 'b;
|
|
}
|
|
|
|
let x = loop {
|
|
break 5;
|
|
};
|
|
|
|
let x = 'c: loop {
|
|
break 'c 5;
|
|
};
|
|
}
|