Marcus Klaas
2eb67827a7
Add extra tests for match arm placement
2015-09-27 11:58:26 +02:00
Nick Cameron
ba51535a74
Fixup tests
2015-09-27 19:39:58 +13: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
Marcus Klaas de Vries
fd057ab595
Merge pull request #367 from nrc/self-alias
...
Format imports with aliases.
2015-09-26 18:25:05 +02:00
Nick Cameron
e4c15b4e1c
Fix tests
2015-09-26 18:35:17 +12:00
Nick Cameron
617eed353c
Changes to rustfmt source
2015-09-26 18:29:48 +12:00
Nick Cameron
3a9e4f0540
add test
2015-09-26 18:27:51 +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
9a5688f7c2
Merge pull request #354 from nrc/max-fn
...
Use vertical formatting when function args width > limit
2015-09-26 14:05:22 +12:00
Nick Cameron
d161b8df72
rebasing changes and address review comment
2015-09-26 14:00:19 +12:00
Nick Cameron
8dfcb9bcdd
Fix tests
2015-09-26 13:58:12 +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
Nick Cameron
415d9898ed
Merge pull request #365 from marcusklaas/format-struct-panic
...
Use the maximum available width in struct formatting
2015-09-26 13:35:41 +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 de Vries
4ccf420415
Merge pull request #363 from marcusklaas/rustup35
...
Adjust for changed representation of box expressions in AST
2015-09-25 13:28:09 +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
Nick Cameron
e80080deb6
Merge pull request #359 from eefriedman/rewrite-addrof
...
Add support for formatting AddrOf (unary "&").
2015-09-24 20:30:54 +12: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
Nick Cameron
56d1a94b5f
Merge pull request #357 from scyptnex/match-comma-retention
...
fix for #355 and test cases
2015-09-24 14:07:39 +12:00
Scyptnex
f1dfab5a29
fix for #355 and test cases
2015-09-24 12:01:48 +10:00
Nick Cameron
e176dc97fe
Merge pull request #347 from scyptnex/issue339-match_block_collapse
...
match arms collapse for issue #339
2015-09-24 12:28:35 +12:00
Scyptnex
19d1ec1dec
Fixes #339 and #272
2015-09-24 10:22:06 +10:00
Nick Cameron
c14cfca0e3
Merge pull request #349 from globin/rust-nightly-update
...
Adapt to rust sytax::ast::Mac changes
2015-09-24 07:10:15 +12: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 de Vries
1dc055c522
Merge pull request #331 from marcusklaas/extern
...
Format foreign functions and statics
2015-09-21 20:05:27 +02:00
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
Nick Cameron
b7866d0e53
Merge pull request #336 from marcusklaas/struct-overflow
...
Fix struct overflows
2015-09-21 10:34:36 +12:00
Marcus Klaas
5ee6304d8d
Fix struct overflows
2015-09-20 18:45:25 +02:00
Marcus Klaas de Vries
0952d7354e
Merge pull request #335 from Kha/struct-lit-base
...
Fix negative overflow and missing '..' on struct lit base exprs
2015-09-20 17:42:23 +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
Marcus Klaas de Vries
ce2c4f6be6
Merge pull request #290 from SiegeLord/tabs
...
Initial implementation of hard tab indentation.
2015-09-20 12:27:16 +02:00
Pavel Sountsov
01bdcd0014
Remove unnecessary config parameter from format_missing_with_indent.
2015-09-19 10:44:28 -07:00