rust/tests/source/fn_args_layout-block.rs
Erik Johnston 57847e451a Add fn_arg_one_line option
If set, arguments will be kept on one line if they fit. Currently only
applies when `fn_args_layout` is set to `Block`.

This commit also fixes a bug where newlines were inserted inbetween
argument brackets when there were no arguments and `fn_args_layout` was
set to `Block`.
2016-04-02 00:25:35 +01:00

27 lines
519 B
Rust

// rustfmt-fn_args_layout: Block
fn foo() {
foo();
}
fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) {
foo();
}
fn bar(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb, c: Cccccccccccccccccc, d: Dddddddddddddddd, e: Eeeeeeeeeeeeeee) {
bar();
}
fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) -> String {
foo();
}
fn bar(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb, c: Cccccccccccccccccc, d: Dddddddddddddddd, e: Eeeeeeeeeeeeeee) -> String {
bar();
}
trait Test {
fn foo(a: u8) {}
fn bar(a: u8) -> String {}
}