diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/source/configs/fn_single_line/false.rs | 11 | ||||
-rw-r--r-- | src/tools/rustfmt/tests/source/configs/fn_single_line/true.rs | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/configs/fn_single_line/false.rs b/src/tools/rustfmt/tests/source/configs/fn_single_line/false.rs new file mode 100644 index 000000000..3d092f0c0 --- /dev/null +++ b/src/tools/rustfmt/tests/source/configs/fn_single_line/false.rs @@ -0,0 +1,11 @@ +// rustfmt-fn_single_line: false +// Single-expression function on single line + +fn lorem() -> usize { + 42 +} + +fn lorem() -> usize { + let ipsum = 42; + ipsum +} diff --git a/src/tools/rustfmt/tests/source/configs/fn_single_line/true.rs b/src/tools/rustfmt/tests/source/configs/fn_single_line/true.rs new file mode 100644 index 000000000..3cb0fdedf --- /dev/null +++ b/src/tools/rustfmt/tests/source/configs/fn_single_line/true.rs @@ -0,0 +1,11 @@ +// rustfmt-fn_single_line: true +// Single-expression function on single line + +fn lorem() -> usize { + 42 +} + +fn lorem() -> usize { + let ipsum = 42; + ipsum +} |