Commit Graph

1808 Commits

Author SHA1 Message Date
Seiichi Uchida
4d11faff4b Update tests 2017-06-18 02:16:27 +09:00
Seiichi Uchida
38c30a3e06 Refactor format against types and generics
Previous implementation relied on the fact that rustfmt used visual indent
style as a default. However, since now rustfmt uses block indent style against
most part of the code, we need some refactorings.
2017-06-18 02:00:58 +09:00
Phil Ellison
c0804f8a55 Fix defaults in Configurations.md 2017-06-17 11:22:04 +01:00
topecongiro
0440c2c377 Update tests 2017-06-17 16:57:00 +09:00
topecongiro
54233acc8e Format source codes 2017-06-17 16:56:54 +09:00
topecongiro
92634a8f69 Use correct budget for chain 2017-06-17 16:56:37 +09:00
topecongiro
7132814a71 Fix wrap_str
Use shape.width for the first line and shape.used_width() for the last line.
2017-06-17 16:54:25 +09:00
topecongiro
53273b8547 Try overflowing the last element of chain only if it goes multi line 2017-06-17 16:54:03 +09:00
Seiichi Uchida
59c0e4c746 Merge pull request #1701 from topecongiro/issue-1697
Forbid overflowing closure if its header goes multi lines
2017-06-17 16:25:10 +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
b048fe6b35 Format source codes 2017-06-17 15:26:59 +09:00
topecongiro
ee0e9aeaae Use special rules when overflowing the last argument
When overflowing the last argument of function call, if it is a closure,
we apply some special rules in order to avoid weird formatting.
2017-06-17 15:24:45 +09:00
topecongiro
af57d285aa Use correct budget for function call args 2017-06-17 15:24:45 +09:00
Nick Cameron
06f351664b Merge pull request #1705 from topecongiro/issue-1703
Preserve comments inside attributes
2017-06-17 16:58:11 +12:00
Nick Cameron
67b4f8a40c Merge pull request #1698 from topecongiro/vec-semi
Use correct indentaion for vec! with semicolon
2017-06-17 16:55:43 +12:00
topecongiro
f60a810730 Preserve comments inside attributes 2017-06-17 05:44:54 +09:00
topecongiro
4a5871eccc Use correct indentaion for vec! with semicolon 2017-06-16 13:57:37 +09:00
Nick Cameron
05559fc8a4 nightly-0.1.3 2017-06-16 16:50:53 +12:00
Nick Cameron
85ecaf99df Config knows if an option was default or set 2017-06-16 16:49:54 +12:00
Nick Cameron
c5538d2a58 Merge pull request #1692 from topecongiro/chain/last-item
Allow overflowing the last item of chain only if it is multi-lined
2017-06-16 13:24:03 +12:00
Nick Cameron
3c36cfbeea Merge pull request #1688 from topecongiro/overflow-closure
Wrap closure in block with a single control flow expr with multi line condition
2017-06-16 13:05:57 +12:00
Nick Cameron
562d218ce9 Update README for running the nightly version 2017-06-16 12:00:43 +12:00
topecongiro
208ff15954 Format source codes 2017-06-16 08:49:49 +09:00
topecongiro
d3d31a9f75 Allow overflowing the last item of chain only if it is multi-lined
By multi-lined we mean if it has more than 3 lines.
2017-06-16 08:47:33 +09:00
topecongiro
e7240f5e24 Add and remove comments 2017-06-16 08:28:12 +09:00
topecongiro
0d5768964b Format source codes and add a test 2017-06-16 07:36:31 +09:00
topecongiro
2f17c31fa4 Wrap closure with a single control flow expr with multi line condition 2017-06-16 07:36:31 +09:00
topecongiro
e22fd0ce59 Refactor rewrite for closure 2017-06-16 07:30:47 +09:00
topecongiro
02f9251007 Refactor rewrite for ConrtolFlow 2017-06-16 07:30:46 +09:00
Nick Cameron
02c1996e3e Merge pull request #1680 from topecongiro/tuple-pattern
Use block indent for tuple pattern
2017-06-16 08:53:54 +12:00
topecongiro
de10113c74 Update tests
Add more patterns and types
2017-06-15 16:55:31 +09:00
topecongiro
8a6e9f689b Format source codes 2017-06-15 16:26:41 +09:00
topecongiro
a5138b1676 Use block indent for tuple pattern when fn_call_style is Block 2017-06-15 16:25:40 +09:00
Nick Cameron
bd1eff55bb Merge pull request #1615 from Mitranim/patch-1
suggested a better Sublime Text plugin
2017-06-15 17:02:36 +12:00
Nick Cameron
2d17fd5f67 nightly v0.1.2 2017-06-15 12:18:52 +12:00
Nick Cameron
a1fdc32d99 Merge pull request #1673 from topecongiro/get-tests-passing-again
Get tests passing again
2017-06-15 10:39:29 +12:00
Nick Cameron
2dde4547fc Merge pull request #1666 from topecongiro/tuple-type
Block indent tuple type when fn_call_style is Block
2017-06-15 10:01:00 +12:00
topecongiro
866c2885f7 Run travis and appveyor only against nightly 2017-06-14 21:07:49 +09:00
topecongiro
b8f11a4e3c Format source codes 2017-06-14 20:39:07 +09:00
topecongiro
c06d487712 Add offset wherever necessary 2017-06-14 20:37:54 +09:00
topecongiro
496e958467 Put match arm guard on the next line if it contains new line 2017-06-14 20:36:28 +09:00
topecongiro
8955eb86e6 Direct format vec! instead of using rewrite_pair 2017-06-14 20:33:54 +09:00
Nick Cameron
b34ac92f86 v0.1.1 2017-06-14 16:38:14 +12:00
Nick Cameron
b8b6897e36 Merge pull request #1671 from robinst/add-cargo-fmt-binary
Add back cargo-fmt binary
2017-06-14 16:36:52 +12:00
Robin Stocker
a13db07b03 Add back cargo-fmt binary (#1670)
When there are no `[[bin]]` sections, all the binaries in `src/bin` are
automatically picked up. When a section is added, that is no longer the
case, so all the binaries need to be specified explicitly.
2017-06-14 14:16:51 +10:00
Nick Cameron
5f1bab26c4 Move to Libsyntax 2017-06-14 14:01:56 +12:00
topecongiro
dacb1ba050 Update tests 2017-06-14 09:30:04 +09:00
topecongiro
18806321e6 Use block indent style against tuple type 2017-06-14 09:29:39 +09:00