rust/tests/target/fn_args_indent-block.rs

145 lines
2.1 KiB
Rust
Raw Normal View History

// rustfmt-normalize_comments: true
// rustfmt-fn_args_indent: Block
fn foo() {
foo();
}
2016-04-07 14:01:16 -05:00
fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) {
foo();
}
fn bar(
a: Aaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
e: Eeeeeeeeeeeeeee,
) {
bar();
}
2016-04-07 14:01:16 -05:00
fn foo(a: Aaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbb) -> String {
foo();
}
fn bar(
a: Aaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
e: Eeeeeeeeeeeeeee,
) -> String {
bar();
}
2016-04-07 14:01:16 -05:00
fn foo(a: u8 /* Comment 1 */, b: u8 /* Comment 2 */) -> u8 {
bar()
}
fn foo(
a: u8, // Comment 1
b: Bbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
e: Eeeeeeeeeeeeeee, // Comment 2
2016-04-07 14:01:16 -05:00
) -> u8 {
bar()
}
fn bar(
a: Aaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
e: Eeeeeeeeeeeeeee,
2016-04-07 14:01:16 -05:00
) -> String
2017-06-11 23:01:41 -05:00
where
X: Fooooo,
Y: Baaar,
2016-04-07 14:01:16 -05:00
{
bar();
}
fn foo() -> T {
foo();
}
fn foo() -> T
2017-06-11 23:01:41 -05:00
where
X: Foooo,
Y: Baaar,
2016-04-07 14:01:16 -05:00
{
foo();
}
2017-06-11 23:01:41 -05:00
fn foo()
where
X: Foooo,
{
}
2016-04-07 14:01:16 -05:00
fn foo()
2017-06-11 23:01:41 -05:00
where
X: Foooo,
Y: Baaar,
2016-04-07 14:01:16 -05:00
{
}
2017-08-01 08:26:37 -05:00
fn foo() -> (
2017-06-13 19:30:04 -05:00
Loooooooooooooooooooooong,
Reeeeeeeeeeeeeeeeeeeeeeeeturn,
iiiiiiiiis,
Looooooooooooooooong,
2017-08-01 08:26:37 -05:00
) {
2016-04-07 14:01:16 -05:00
foo();
}
fn foo<g: G>() {
foo();
}
2017-06-14 06:39:07 -05:00
fn foo<
L: Loooooooooooooooooooooong,
G: Geeeeeeeeeeeneric,
I: iiiiiiiiis,
L: Looooooooooooooooong,
>() {
2016-04-07 14:01:16 -05:00
foo();
}
fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>() {
foo();
}
trait Test {
2016-04-07 14:01:16 -05:00
fn foo(a: u8) {}
fn bar(
2016-04-07 14:01:16 -05:00
a: Aaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
e: Eeeeeeeeeeeeeee,
) -> String {
}
}
2016-04-07 14:24:30 -05:00
fn foo<L: Loooooooooooooooooooong, G: Geeeeeeeeeeneric, I: iiiiiiiiis, L: Loooooooooooooooong>(
a: Aaaaaaaaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbbbbb,
c: Cccccccccccccccccc,
d: Dddddddddddddddd,
2016-04-07 14:24:30 -05:00
) {
foo();
}
2017-08-01 08:26:37 -05:00
fn foo() -> (
2017-06-13 19:30:04 -05:00
Looooooooooooooooooooooooooong,
Reeeeeeeeeeeeeeeeeeeeeeeeeeeeeturn,
iiiiiiiiiiiiiis,
Loooooooooooooooooooooong,
2017-08-01 08:26:37 -05:00
) {
2016-04-07 14:24:30 -05:00
foo();
}