1232 Commits

Author SHA1 Message Date
topecongiro
e2d51aeb41 Use correct span for MetaItem 2017-06-14 00:09:05 +09:00
topecongiro
384d985df9 Do not rely on format_missing for rewriting attributes 2017-06-14 00:08:31 +09:00
topecongiro
c4d84b44ba Avoid overflow 2017-06-14 00:06:48 +09:00
Nick Cameron
18ccd0190e Rebasing 2017-06-13 14:49:47 +12:00
Nick Cameron
6f30d9e7c9 Reformat tests 2017-06-13 14:42:54 +12:00
Nick Cameron
1f512948a0 Reformat source code using new defaults 2017-06-13 14:41:49 +12:00
Nick Cameron
32e882789b Change defaults to RFC style 2017-06-13 14:37:04 +12:00
Nick Cameron
14227ddc40 Merge pull request #1664 from topecongiro/where-rfc-style
Fix excessive indentation in trait where clause when using Rfc style
2017-06-13 14:28:57 +12:00
Nick Cameron
6c9e77cdb3 Merge pull request #1663 from topecongiro/issue-1660
Use with_emitter instead of with_tty_emitter
2017-06-13 14:28:19 +12:00
topecongiro
f084a8af96 Fix excessive indentation in trait where clause when using Rfc style 2017-06-13 10:18:55 +09:00
topecongiro
6e3394e635 Use with_emitter instead of with_tty_emitter 2017-06-13 09:18:14 +09:00
Nick Cameron
5531a93b57 Merge pull request #1657 from topecongiro/issue-1656
Put match arm's guard on new line if it exceeds max width
2017-06-13 11:58:16 +12:00
Nick Cameron
5d78d1fe00 Merge pull request #1655 from topecongiro/issue-1652
Use correct indent for return type when it goes multi line
2017-06-13 11:57:30 +12:00
Nick Cameron
c07925f498 Merge pull request #1647 from topecongiro/refactor-impl-format
Refactor impl format
2017-06-13 11:55:33 +12:00
Nick Cameron
6ed3077651 Merge pull request #1654 from topecongiro/over-long-lines
Use block indent for args of macro if single line args exceeds max width
2017-06-13 09:41:59 +12:00
topecongiro
ad628f6acc Force multi line if the first attempt of rewriting args failed 2017-06-12 18:34:38 +09:00
topecongiro
57fc39305d Put guard on newline if it exceeds max width 2017-06-12 17:25:38 +09:00
topecongiro
9df1509d19 Use rewrite instead of visitor for attributes 2017-06-12 17:25:07 +09:00
topecongiro
d269189f19 Use correct indent for return type when it goes multi line 2017-06-12 16:23:10 +09:00
topecongiro
9ad499786d Use block indent for args if single line args exceeds max width 2017-06-12 15:58:27 +09:00
topecongiro
62e9473d07 Update rewrite_trait_ref to return Option<String> 2017-06-12 08:53:19 +09:00
Nick Cameron
272b0b6f49 Merge pull request #1649 from topecongiro/issue-1648
Add offset to struct literal fields when `struct_lit_style` is `"Visual"`
2017-06-12 10:39:28 +12:00
Nick Cameron
5136e051fa Merge pull request #1646 from topecongiro/issue-1606
Reset the error count of parser from the previous file
2017-06-12 10:37:50 +12:00
topecongiro
f135641cc8 Use multi line when type bounds does not fit in a single line 2017-06-11 23:26:49 +09:00
topecongiro
9b195ae228 Refactor format_impl 2017-06-11 14:32:44 +09:00
Seiichi Uchida
f2838595d5 Add visual offset when using struct_lit_style is Visual 2017-06-10 22:20:11 +09:00
topecongiro
bd80077be8 Add format_trait_ref_then_update_result 2017-06-10 21:07:38 +09:00
topecongiro
88e522f921 Use multiline in generics rather than fail 2017-06-10 19:45:23 +09:00
topecongiro
9eefc6fc8d Share codes when rewriting generics 2017-06-10 18:31:01 +09:00
topecongiro
762639e7fd Reset the error count of parser from the previous file 2017-06-10 14:34:50 +09:00
topecongiro
c92064c30a Force brace on new line if the signature ends with comment 2017-06-09 16:15:31 +09:00
Nick Cameron
c879d5ebd7 Merge pull request #1640 from topecongiro/issue-1632
Do not overwrite files when there are no diffs in Overwrite mode
2017-06-07 10:05:36 +12:00
topecongiro
a64037d0f0 Do not overwrite files when there are no diffs in Overwrite mode 2017-06-06 15:33:46 +09:00
Nick Cameron
de6bfc4ad7 Rebasing 2017-06-06 07:32:06 +02:00
topecongiro
27da80324c Implement catch 2017-06-06 07:32:06 +02:00
topecongiro
647fd4ff77 Leave GlobalAsm and MacroDef without formatting 2017-06-06 07:32:06 +02:00
topecongiro
e994eac3f1 Format pub(restricted) properly 2017-06-06 07:32:06 +02:00
est31
727963afe4 Update syntex_syntax
Bases on commit to switch to libsyntax by @nrc
2017-06-06 07:31:47 +02:00
Nick Cameron
8ac9245df4 Merge pull request #1634 from topecongiro/impl-rewrite-attribute
Implement Rewrite trait for syntax::ast::Attribute
2017-06-06 17:11:10 +12:00
topecongiro
7be703a637 Implement Rewrite trait for syntax::ast::Attribute 2017-06-06 13:55:34 +09:00
Nick Cameron
6a9d7dab0d Merge pull request #1637 from est31/master
Add config options for spaces around the colon in struct literal fields
2017-06-06 16:20:16 +12:00
Nick Cameron
450631ae67 Merge pull request #1633 from topecongiro/rfc/control-style
Do not add offset to match pattern when using Rfc style
2017-06-06 14:54:28 +12:00
Nick Cameron
130aa70e3a Merge pull request #1621 from topecongiro/combining
Combine more expressions
2017-06-06 14:52:48 +12:00
est31
aa4cd311bb Add config options for spaces around the colon in struct literal fields
In Rust, colons are used for three purposes:

* Type annotations, including type ascription
* Trait bounds
* Struct literal fields

This commit adds options for the last missing of the three purposes,
struct literal fields.
2017-06-06 03:50:58 +02:00
topecongiro
86be2e7bf8 Do not add offset to match pattern when using Rfc style 2017-06-05 17:57:43 +09:00
topecongiro
7250a468f9 Format source codes 2017-06-05 15:32:21 +09:00
topecongiro
41b7cc6a73 Set combine_control_expr to false by default and true in rfc-rustfmt 2017-06-05 15:31:44 +09:00
topecongiro
0292640e14 Allow chain item to extend if the parent ends with closing parens and alike 2017-06-05 15:31:05 +09:00
Nick Cameron
d04ab9e5ba Merge pull request #1630 from topecongiro/issue-1115
Allow comments after attributes on enum fields
2017-06-05 11:41:52 +12:00
Nick Cameron
14a1ea8193 Merge pull request #1629 from topecongiro/issue-982
Use recover_comment_removed in rewrite_static
2017-06-05 11:37:21 +12:00