mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-04 20:54:13 +00:00
2fb66cd1d3
trailing_semicolon controls whether to add a trailing semicolon after break, continue and return.
28 lines
346 B
Rust
28 lines
346 B
Rust
// rustfmt-trailing_semicolon: false
|
|
|
|
#![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
|
|
};
|
|
}
|
|
|
|
fn foo() -> usize {
|
|
return 0
|
|
}
|