57847e451a
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`.
49 lines
613 B
Rust
49 lines
613 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 {
|
|
}
|
|
}
|