rust/tests/target/configs-where_single_line.rs
Afshin Mehrabani f412c875ea Adding where_single_line option (#2030)
* feat(where): adding where_single_line option and tests

* fix(where): adding more tests

* feat(where): changing the shape of where clause when where_single_line is true

* feat: newline_for_brace should avoid adding a new line where where_single_line is true

* fix(items): where_single_line should bypass the multi-item where clauses

* fix(items): refactoring and removing redundant variables

* fix(items): where_single_line should not be functional when args are multilined

* fix(config): fixing conflict with upstream
2017-11-06 11:53:17 +13:00

29 lines
457 B
Rust

// rustfmt-where_single_line: true
// Where style
fn lorem_two_items<Ipsum, Dolor, Sit, Amet>() -> T
where
Ipsum: Eq,
Lorem: Eq,
{
// body
}
fn lorem_multi_line<Ipsum, Dolor, Sit, Amet>(
a: Aaaaaaaaaaaaaaa,
b: Bbbbbbbbbbbbbbbb,
c: Ccccccccccccccccc,
d: Ddddddddddddddddddddddddd,
e: Eeeeeeeeeeeeeeeeeee,
) -> T
where
Ipsum: Eq,
{
// body
}
fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
where Ipsum: Eq {
// body
}