Commit Graph

58 Commits

Author SHA1 Message Date
Nick Cameron
a7183766b9 Test fallout 2017-04-06 13:06:11 +12:00
Nick Cameron
5305bc8436 test fallout 2017-03-28 11:25:59 +13:00
Nick Cameron
488c0b9546 Test and source fallout 2017-03-22 09:25:26 +13:00
Nick Cameron
981b031c9f Treat new blocks like existing ones in closures
Fixes #1355
2017-03-07 14:30:01 +13:00
Nick Cameron
b9ab3ef9da Test fallout 2017-03-07 11:28:25 +13:00
Nick Cameron
ba1202f6b3 test fallout 2017-02-23 13:15:48 +13:00
Nick Cameron
d948485371 Allow empty blocks on one line in more places
In particular if they contain only a single-line comment.

Fixes #493
2017-01-16 16:37:58 +13:00
Nick Cameron
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +13:00
Nick Cameron
9be2971274 Refactor pairs/binops 2017-01-11 12:06:23 +13:00
sinkuu
b6bffa6596 Prevent line breaking at = or in after trivial patterns 2016-09-17 13:03:14 +09:00
Marcus Klaas
b3488c6186 Fix constraints on pattern formatting of else arms 2016-06-03 23:18:19 +02: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
Marcus Klaas
9eee93306a Format closed ranges 2016-03-29 23:58:45 +02:00
DarkDrek
937e26d4e1 fixes parsing issue #767 2016-01-12 21:13:59 +01:00
Marcus Klaas de Vries
b6120b39ab Merge pull request #571 from nrc/semi
Don't strip semi-colons from expressions with non-void type since it …
2015-11-10 08:43:29 +01:00
Nick Cameron
b7d61254a7 Option to disable line breaking in comments
Set to false by default for now, since we are having a lot of problems with comments. We should set to true once we have a better algorithm.
2015-11-10 08:03:01 +13:00
Nick Cameron
3dc0b804f1 Don't strip semi-colons from expressions with non-void type since it can change semantics 2015-11-09 13:23:19 +13:00
Marcus Klaas
e8447a8210 Fix large block comments 2015-10-19 23:06:36 +02:00
Marcus Klaas
ca023ba9b7 Format some patterns 2015-10-19 20:15:36 +02:00
Marcus Klaas
a9bd695723 Format vec! macro using brackets 2015-10-16 22:55:42 +02:00
Marcus Klaas
b039e3a8c3 Force semicolons after break/continue/return. Remove after blocks. 2015-10-15 19:55:42 +02:00
Gaurav Saxena
af00f3ffe6 added semicolons to break statements 2015-10-13 02:17:51 -04:00
Marcus Klaas
e6af5d2c83 Use visual block indentation for array literals 2015-10-12 21:14:12 +02:00
Marcus Klaas
ca0b860688 Format repeated element array literals 2015-10-02 12:00:28 +02:00
Marcus Klaas
ad2e3b8e2b Format indices 2015-10-02 11:47:03 +02:00
Marcus Klaas
603f2034a5 Format type casts 2015-10-02 11:31:40 +02:00
Marcus Klaas
078fff068a Improve heuristics for match arm body placement 2015-09-26 22:35:53 +02:00
Eli Friedman
19e887c309 Add support for formatting AddrOf (unary "&"). 2015-09-24 01:13:57 -07:00
Nick Cameron
d941fe20b4 Merge pull request #358 from eefriedman/rewrite-return
Add support for formatting "return" expressions.
2015-09-24 18:19:37 +12:00
Eli Friedman
69da1a78de Add support for formatting "return" expressions.
Fixes #303.
2015-09-23 23:12:04 -07:00
Scyptnex
f1dfab5a29 fix for #355 and test cases 2015-09-24 12:01:48 +10:00
Scyptnex
19d1ec1dec Fixes #339 and #272 2015-09-24 10:22:06 +10:00
Manish Goregaokar
106f7251fb Add tests, reformat expr 2015-09-22 09:35:50 +05:30
Marcus Klaas
5ee6304d8d Fix struct overflows 2015-09-20 18:45:25 +02:00
Sebastian Ullrich
9bd502ad54 Fix negative overflow and missing '..' on struct lit base exprs 2015-09-20 15:47:21 +02:00
Marcus Klaas
7deee6daf5 Format array literals 2015-09-12 00:06:17 +02:00
Marcus Klaas
436f8663e3 Add regression test for bad continue span 2015-09-11 23:32:13 +02:00
Marcus Klaas
659c9b9037 Update indentation heuristics for single arg functions 2015-09-11 00:52:20 +02:00
Nick Cameron
e0c197cab4 Single line unsafe blocks 2015-09-07 07:31:02 +12:00
Marcus Klaas
336759d592 Add regression test for bad break span 2015-09-03 20:15:24 +02:00
Marcus Klaas
a896d91ff6 Fix offset for unary operations
Fixes https://github.com/nrc/rustfmt/issues/227.
2015-08-31 19:15:40 +02:00
Marcus Klaas
b7a71250f4 Implement single line if-else formatting 2015-08-25 22:09:46 +02:00
Marcus Klaas
120fd2426e Format assignment 2015-08-25 21:43:13 +02:00
Nick Cameron
43ad7ad7a0 Re-jig binop formatting
and misc other fixes from the reviews.
2015-08-20 08:18:02 +12:00
Nick Cameron
d10629d8a5 Allow {} to remain. 2015-08-20 08:08:11 +12:00
Marcus Klaas
0f640b06dd Properly format unsafe blocks 2015-08-02 12:40:02 +02:00
Gaëtan Cassiers
efda914ab9 Add regression tests for binOps 2015-07-25 23:28:31 +02:00
Gaëtan Cassiers
ff301efa4e Fix width computation in rewrite_binary_op
Operator width was counted twice.
2015-07-25 18:58:16 +02:00
Nick Cameron
8461e8a0a8 Merge pull request #147 from marcusklaas/even-more-expr
Format if expressions & loops
2015-07-25 09:51:59 +12:00