diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/target/configs/trailing_semicolon/true.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/configs/trailing_semicolon/true.rs b/src/tools/rustfmt/tests/target/configs/trailing_semicolon/true.rs new file mode 100644 index 000000000..61b6843d6 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/trailing_semicolon/true.rs @@ -0,0 +1,27 @@ +// 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; +} |