Commit graph

306 commits

Author SHA1 Message Date
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 de Vries
fff0be2f82 Merge pull request #402 from tikue/master
Fix 1-tuple regression.
2015-10-02 08:44:21 +02:00
Marcus Klaas de Vries
63860bb777 Merge pull request #378 from sinhpham/fix_376
Fix https://github.com/nrc/rustfmt/issues/376
2015-10-02 08:42:43 +02:00
Tim Kuehn
6c6e7194c2 Fix 1-tuple regression.
Add test to prevent future regressions.
2015-10-01 11:06:49 -07:00
Sinh Pham
11ed3c81d5 Fix https://github.com/nrc/rustfmt/issues/376 2015-09-30 23:43:56 -04:00
Marcus Klaas de Vries
7b40bfa8d5 Merge pull request #380 from sinhpham/fix_377
Fix https://github.com/nrc/rustfmt/issues/377
2015-09-29 19:40:24 +02:00
Scyptnex
00b314618d Refactoring configuration 2015-09-29 09:38:19 +10:00
Marcus Klaas de Vries
10eb21d020 Merge pull request #384 from nrc/where-empty
Option for putting the where clause on the same line as the function …
2015-09-28 19:43:25 +02:00
Sinh Pham
220ecdaf71 Fix https://github.com/nrc/rustfmt/issues/377 2015-09-27 17:03:48 -04:00
Marcus Klaas
30aefa6dc7 Prevent arithmetic overflow handling match arm comments 2015-09-27 22:11:17 +02:00
Nick Cameron
840af4f84d Option for putting the where clause on the same line as the function if the body is empty. 2015-09-28 08:46:05 +13:00
Nick Cameron
9139a8040c Merge pull request #379 from marcusklaas/enum-quik-fix
Fix variant name duplication on rewrite failure
2015-09-28 07:51:09 +13:00
Marcus Klaas
431e8d9d2f Remove a few unchecked subtractions, uses of ty_to_string 2015-09-27 17:56:38 +02:00
Marcus Klaas
a673fef844 Fix variant name duplication on rewrite failure 2015-09-27 17:23:37 +02:00
Marcus Klaas de Vries
0f485aabd6 Merge pull request #374 from nrc/fix-fn
Use max width for function decls, not ideal width
2015-09-27 14:52:08 +02:00
Marcus Klaas de Vries
afee62e476 Merge pull request #370 from marcusklaas/match-arm-delining
Improve heuristics for match arm body placement
2015-09-27 12:00:57 +02:00
Marcus Klaas
2eb67827a7 Add extra tests for match arm placement 2015-09-27 11:58:26 +02:00
Nick Cameron
bc59f83f02 Use max width for function decls, etc.
We were using ideal width + leeway before. This means we can remove leeway from the config. We could remove ideal_width too, but I want to use it for comments.
2015-09-27 19:34:35 +13:00
Nick Cameron
224eecce50 Minor refactoring in compute_budgets_for_args 2015-09-27 19:25:04 +13:00
Nick Cameron
dad4626517 Merge pull request #368 from nrc/struct-wide
Use a width heuristic for struct lits
2015-09-27 10:50:50 +13:00
Marcus Klaas
2d4a0cbe3b Fix match arm indentation bug 2015-09-26 23:18:57 +02:00
Marcus Klaas
078fff068a Improve heuristics for match arm body placement 2015-09-26 22:35:53 +02:00
Nick Cameron
617eed353c Changes to rustfmt source 2015-09-26 18:29:48 +12:00
Nick Cameron
b894dd8abf Use a width heuristic for struct lits.
Closes #123
2015-09-26 18:25:41 +12:00
Nick Cameron
b2e7da0aa0 Format imports with aliases.
Closes #366
2015-09-26 18:12:25 +12:00
Nick Cameron
d161b8df72 rebasing changes and address review comment 2015-09-26 14:00:19 +12:00
Nick Cameron
99d71a164a Changes to source formatting 2015-09-26 13:58:12 +12:00
Nick Cameron
ebf64ca35d Heuristic max width for function calls 2015-09-26 13:54:22 +12:00
Nick Cameron
e161de0daa Merge pull request #352 from nrc/ty_parens_fix
Formatting of some types
2015-09-26 13:50:00 +12:00
Nick Cameron
92fbb80097 Formatting of some types
Closes #341
2015-09-26 13:48:02 +12:00
Nick Cameron
dcbfd0469f Merge pull request #362 from marcusklaas/rewrite-string
Make rewrite_string return `Option<String>`
2015-09-26 13:36:59 +12:00
Marcus Klaas
5db17ca703 Use the maximum available width in struct formatting
Previously, we'd use an approximation for the maximum width since the configuration wasn't available in `write_list`.
2015-09-25 16:56:22 +02:00
Marcus Klaas
bc0dd2c68d Adjust for changed representation of box expressions in AST 2015-09-25 13:25:52 +02:00
Marcus Klaas
a7690cb1e5 Make rewrite_string return Option<String> 2015-09-25 13:01:20 +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
Eli Friedman
ed597a8059 Exhaustively enumerate expressions in expression rewriting. 2015-09-23 22:51:37 -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
Robin Gloster
5e2633b742 adapt to rust sytax::ast::Mac changes 2015-09-23 18:31:31 +00:00
Nick Cameron
5e18b03bb9 Merge pull request #345 from Manishearth/fix-match
Handle comments in match better (fixes #344)
2015-09-22 17:00:18 +12:00
Manish Goregaokar
106f7251fb Add tests, reformat expr 2015-09-22 09:35:50 +05:30
Marcus Klaas
71faa8984d Format foreign functions and statics 2015-09-21 20:02:45 +02:00
Marcus Klaas de Vries
fa67e0359a Merge pull request #334 from marcusklaas/sparse-mods
Place the closing brace of an inline mod on a new line
2015-09-21 19:42:36 +02:00
Manish Goregaokar
abdb693922 Handle comments in match better (fixes #344) 2015-09-21 17:48:35 +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
f8e74bfa2c Place the closing brace of an inline mod on a new line 2015-09-20 14:22:12 +02:00