Commit Graph

43 Commits

Author SHA1 Message Date
Nick Cameron
4fa2969c39 fixup tests 2018-07-24 15:46:39 +12:00
Nick Cameron
4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
topecongiro
366ff40ae7 Take the width of block's prefix into account only once 2017-12-20 15:44:11 +09:00
Seiichi Uchida
4110c7b8c5 Add a test for #2262 2017-12-10 21:19:51 +09:00
Seiichi Uchida
9ea3e65df6 Update tests 2017-11-30 06:10:59 +09:00
Seiichi Uchida
35aa1dc992 Add a test for #2207 2017-11-30 06:10:50 +09:00
topecongiro
44d81d9e0e Add a test for #2171 2017-11-20 16:38:15 +09:00
Nick Cameron
8a27a2da62 Add a test for #1524 2017-11-13 16:51:28 +13:00
topecongiro
9de9693a45 Add a test
rustfmt fails to format a function call when it has a single closure argument
and that closure has a block body which contains comments at the beginnig of
the block, and the block only contains a single expression as its statement.
Phew!
2017-10-27 15:39:15 +09:00
Seiichi Uchida
7cbdf35f63 Add a test for #2063 2017-10-17 00:12:22 +09:00
topecongiro
ff30782725 Update tests 2017-09-15 12:20:58 +09:00
Vadim Petrochenkov
6e5c6f5ba3 Use getters to access Span fields 2017-08-31 14:14:13 +12:00
topecongiro
ec4b439484 Disallow overflowing closure if there are multiple closures in args 2017-06-19 12:07:20 +09:00
topecongiro
e31f5eceac Use correct span for Infer type inside closure header 2017-06-17 15:35:29 +09:00
topecongiro
897d7bdcb9 Add a test for #1697 2017-06-17 15:26:59 +09:00
topecongiro
9b73490491 Update tests 2017-06-17 15:26:59 +09:00
topecongiro
de10113c74 Update tests
Add more patterns and types
2017-06-15 16:55:31 +09:00
Nick Cameron
6f30d9e7c9 Reformat tests 2017-06-13 14:42:54 +12:00
topecongiro
72c04facd2 Add tests for issues which can be closed on the current master
This PR adds tests for #325, #1092,  #1214, #1278, #1329 and #1427.
2017-05-28 13:24:05 +09:00
topecongiro
635fdc662a Format source codes 2017-05-25 15:50:46 +09:00
topecongiro
2ee8e730a6 Add fallback path 2017-05-07 13:13:44 +09:00
topecongiro
b48f4e03b3 Add tests for issues which can be closed on master 2017-05-04 14:32:13 +09:00
topecongiro
6d14ac84a4 Update tests 2017-05-03 11:30:17 +09:00
topecongiro
0614e94d0d Format source codes 2017-04-15 18:42:45 +09:00
Nick Cameron
4bb31a7231 Block indenting for struct lit patterns
Now follows struct_lit_style (and most other struct_lit_ options).

Required a fair bit of refactoring and bug fixes.

Fixes #1311
2017-03-22 09:25:26 +13:00
Nick Cameron
a7612cc773 more fallout 2017-02-23 13:15:48 +13:00
Nick Cameron
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +13:00
Nick Cameron
d3eba76e4d update Serde, etc.
Lots of changes to how closures work
2016-11-21 11:02:18 +13:00
Marcus Klaas
98c0570a28 Format non-statement if-else expressions on a single line 2016-05-29 17:58:38 +02:00
Marcus Klaas
eae2921e14 Bootstrap it. Hard. 2016-05-12 21:50:43 +02:00
Nick Cameron
7a758ea20a Fix closures again (#937)
* Fix closures again

Closes #934

Oh god, the rules for parsing closures are even more messed up than I thought - whether or not there is an inner block or depends not only on if there are braces, but also if there is a return type for the closure (!) and if there are statements in the block.

* Fix overflow
2016-04-15 10:52:08 +02:00
Nick Cameron
c7780fdfd8 Be careful about where we change braces in closures
And some general refactoring of closure code.

Fixes #863
2016-04-14 09:05:42 +12:00
Nick Cameron
9d8ce54428 Don't apply the function args heuristic to tuple lits.
Closes #450
Closes #510
2016-03-14 20:51:06 +13:00
Marcus Klaas
e8447a8210 Fix large block comments 2015-10-19 23:06:36 +02:00
Nick Cameron
8dfcb9bcdd Fix tests 2015-09-26 13:58:12 +12:00
Marcus Klaas
ffa7e8d599 Prevent generation of bogus comment in some function calls
This would happen when the callee contained parentheses.
2015-09-12 14:31:51 +02:00
Marcus Klaas
7f576b0602 General cleanup after rebase 2015-09-11 00:53:21 +02:00
Marcus Klaas
659c9b9037 Update indentation heuristics for single arg functions 2015-09-11 00:52:20 +02:00
Marcus Klaas
582aa4f2fe Format closures' return types 2015-09-08 20:56:33 +02:00
Marcus Klaas
c8fd23ca68 Refactor closure formatting routine 2015-08-20 23:05:41 +02:00
Marcus Klaas
a75017e50e Add additional tests for closures 2015-08-20 22:08:51 +02:00
Marcus Klaas
5fcd313b08 Format closures 2015-08-19 23:15:56 +02:00