Commit Graph

57 Commits

Author SHA1 Message Date
Seiichi Uchida
0e660e4c76 Add a test for #2493 2018-03-08 17:16:42 +09: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
Nick Cameron
fc52a4d33f
Merge pull request #2173 from topecongiro/assignment-with-100-chars
Assignment whose lhs has 100 chars
2017-12-11 17:04:41 +13:00
topecongiro
0f6b4977dd Add a test for #2178 2017-11-30 15:00:13 +09:00
topecongiro
c2804589a1 Add a test for assignment whose lhs is exactly 100 chars 2017-11-21 08:50:55 +09:00
Badel2
feb7a6a0a6 Replace ... by ..= in range expr tests 2017-09-27 22:47:34 +02:00
Seiichi Uchida
7c9aee78f0 Update tests 2017-07-26 22:43:50 +09:00
topecongiro
7ab4bdfd85 Use correct one line budget when rewriting index 2017-07-10 14:23:29 +09:00
topecongiro
183e3482e5 Add a space before range if lhs ends with dot 2017-07-04 20:23:57 +09:00
topecongiro
5f77581763 Put multi-lined index on the next line if it fits in one line 2017-06-26 07:57:06 +09:00
topecongiro
b5a13602d9 Update tests 2017-06-20 22:35:16 +09:00
Nick Cameron
488c0b9546 Test and source fallout 2017-03-22 09:25:26 +13:00
Nick Cameron
846d7ad387 make rustfmt-normalize_comments false by default 2017-01-16 14:50:27 +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
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
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
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
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
Nick Cameron
4aa24f5962 Merge pull request #158 from marcusklaas/modules
Use new module code from libsyntax
2015-07-25 09:48:58 +12:00