rust/tests/target/configs-trailing_semicolon-true.rs
topecongiro 2fb66cd1d3 Add trailing_semicolon config option
trailing_semicolon controls whether to add a trailing semicolon after break,
continue and return.
2017-07-12 14:16:06 +09:00

28 lines
350 B
Rust

// rustfmt-trailing_semicolon: true
#![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;
}