]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoReformat tests
Nick Cameron [Mon, 12 Jun 2017 04:01:41 +0000 (16:01 +1200)]
Reformat tests

7 years agoReformat source code using new defaults
Nick Cameron [Mon, 12 Jun 2017 03:58:58 +0000 (15:58 +1200)]
Reformat source code using new defaults

7 years agoChange defaults to RFC style
Nick Cameron [Mon, 12 Jun 2017 03:50:43 +0000 (15:50 +1200)]
Change defaults to RFC style

7 years ago0.8.6
Nick Cameron [Tue, 13 Jun 2017 02:33:17 +0000 (14:33 +1200)]
0.8.6

7 years agoMerge pull request #1664 from topecongiro/where-rfc-style
Nick Cameron [Tue, 13 Jun 2017 02:28:57 +0000 (14:28 +1200)]
Merge pull request #1664 from topecongiro/where-rfc-style

Fix excessive indentation in trait where clause when using Rfc style

7 years agoMerge pull request #1663 from topecongiro/issue-1660
Nick Cameron [Tue, 13 Jun 2017 02:28:19 +0000 (14:28 +1200)]
Merge pull request #1663 from topecongiro/issue-1660

Use with_emitter instead of with_tty_emitter

7 years agoMerge branch 'master' of github.com:rust-lang-nursery/rustfmt
Nick Cameron [Tue, 13 Jun 2017 02:24:53 +0000 (14:24 +1200)]
Merge branch 'master' of github.com:rust-lang-nursery/rustfmt

7 years agoFix excessive indentation in trait where clause when using Rfc style
topecongiro [Tue, 13 Jun 2017 01:18:55 +0000 (10:18 +0900)]
Fix excessive indentation in trait where clause when using Rfc style

7 years agoUse with_emitter instead of with_tty_emitter
topecongiro [Tue, 13 Jun 2017 00:18:14 +0000 (09:18 +0900)]
Use with_emitter instead of with_tty_emitter

7 years agoMerge pull request #1657 from topecongiro/issue-1656
Nick Cameron [Mon, 12 Jun 2017 23:58:16 +0000 (11:58 +1200)]
Merge pull request #1657 from topecongiro/issue-1656

Put match arm's guard on new line if it exceeds max width

7 years agoMerge pull request #1655 from topecongiro/issue-1652
Nick Cameron [Mon, 12 Jun 2017 23:57:30 +0000 (11:57 +1200)]
Merge pull request #1655 from topecongiro/issue-1652

Use correct indent for return type when it goes multi line

7 years agoMerge pull request #1647 from topecongiro/refactor-impl-format
Nick Cameron [Mon, 12 Jun 2017 23:55:33 +0000 (11:55 +1200)]
Merge pull request #1647 from topecongiro/refactor-impl-format

Refactor impl format

7 years agoMerge pull request #1654 from topecongiro/over-long-lines
Nick Cameron [Mon, 12 Jun 2017 21:41:59 +0000 (09:41 +1200)]
Merge pull request #1654 from topecongiro/over-long-lines

Use block indent for args of macro if single line args exceeds max width

7 years agoForce multi line if the first attempt of rewriting args failed
topecongiro [Mon, 12 Jun 2017 09:34:38 +0000 (18:34 +0900)]
Force multi line if the first attempt of rewriting args failed

7 years agoPut guard on newline if it exceeds max width
topecongiro [Mon, 12 Jun 2017 08:25:38 +0000 (17:25 +0900)]
Put guard on newline if it exceeds max width

7 years agoUse rewrite instead of visitor for attributes
topecongiro [Mon, 12 Jun 2017 08:25:07 +0000 (17:25 +0900)]
Use rewrite instead of visitor for attributes

7 years agoUse correct indent for return type when it goes multi line
topecongiro [Mon, 12 Jun 2017 07:23:10 +0000 (16:23 +0900)]
Use correct indent for return type when it goes multi line

7 years agoUse block indent for args if single line args exceeds max width
topecongiro [Mon, 12 Jun 2017 06:58:27 +0000 (15:58 +0900)]
Use block indent for args if single line args exceeds max width

7 years agov0.8.5 + cargo update
Nick Cameron [Mon, 12 Jun 2017 03:44:56 +0000 (15:44 +1200)]
v0.8.5 + cargo update

7 years agoUpdate rewrite_trait_ref to return Option<String>
topecongiro [Sun, 11 Jun 2017 23:53:19 +0000 (08:53 +0900)]
Update rewrite_trait_ref to return Option<String>

7 years agoMerge pull request #1649 from topecongiro/issue-1648
Nick Cameron [Sun, 11 Jun 2017 22:39:28 +0000 (10:39 +1200)]
Merge pull request #1649 from topecongiro/issue-1648

Add offset to struct literal fields when `struct_lit_style` is `"Visual"`

7 years agoMerge pull request #1646 from topecongiro/issue-1606
Nick Cameron [Sun, 11 Jun 2017 22:37:50 +0000 (10:37 +1200)]
Merge pull request #1646 from topecongiro/issue-1606

Reset the error count of parser from the previous file

7 years agoMerge pull request #1644 from topecongiro/issue-1643
Nick Cameron [Sun, 11 Jun 2017 22:35:39 +0000 (10:35 +1200)]
Merge pull request #1644 from topecongiro/issue-1643

Force brace on new line if the signature ends with comment

7 years agoUpdate tests
topecongiro [Sun, 11 Jun 2017 14:27:02 +0000 (23:27 +0900)]
Update tests

7 years agoUse multi line when type bounds does not fit in a single line
topecongiro [Sun, 11 Jun 2017 14:26:49 +0000 (23:26 +0900)]
Use multi line when type bounds does not fit in a single line

7 years agoRefactor format_impl
topecongiro [Sun, 11 Jun 2017 05:32:44 +0000 (14:32 +0900)]
Refactor format_impl

7 years agoFix Configurations.md
Seiichi Uchida [Sat, 10 Jun 2017 13:23:09 +0000 (22:23 +0900)]
Fix Configurations.md

7 years agoAdd visual offset when using struct_lit_style is Visual
Seiichi Uchida [Sat, 10 Jun 2017 13:20:11 +0000 (22:20 +0900)]
Add visual offset when using struct_lit_style is Visual

7 years agoAdd format_trait_ref_then_update_result
topecongiro [Sat, 10 Jun 2017 11:37:34 +0000 (20:37 +0900)]
Add format_trait_ref_then_update_result

7 years agoUse multiline in generics rather than fail
topecongiro [Sat, 10 Jun 2017 10:45:23 +0000 (19:45 +0900)]
Use multiline in generics rather than fail

7 years agoShare codes when rewriting generics
topecongiro [Sat, 10 Jun 2017 09:24:23 +0000 (18:24 +0900)]
Share codes when rewriting generics

7 years agoReset the error count of parser from the previous file
topecongiro [Sat, 10 Jun 2017 05:16:12 +0000 (14:16 +0900)]
Reset the error count of parser from the previous file

7 years agoForce brace on new line if the signature ends with comment
topecongiro [Fri, 9 Jun 2017 07:15:31 +0000 (16:15 +0900)]
Force brace on new line if the signature ends with comment

7 years agoMerge pull request #1640 from topecongiro/issue-1632
Nick Cameron [Tue, 6 Jun 2017 22:05:36 +0000 (10:05 +1200)]
Merge pull request #1640 from topecongiro/issue-1632

Do not overwrite files when there are no diffs in Overwrite mode

7 years agoMerge pull request #1639 from topecongiro/rfc-update
Nick Cameron [Tue, 6 Jun 2017 20:08:59 +0000 (08:08 +1200)]
Merge pull request #1639 from topecongiro/rfc-update

Add 'fn_args_paren_newline = false' to rfc-rustfmt.toml

7 years agoDo not overwrite files when there are no diffs in Overwrite mode
topecongiro [Tue, 6 Jun 2017 06:33:46 +0000 (15:33 +0900)]
Do not overwrite files when there are no diffs in Overwrite mode

7 years agoMerge pull request #1638 from est31/master
Nick Cameron [Tue, 6 Jun 2017 05:44:09 +0000 (17:44 +1200)]
Merge pull request #1638 from est31/master

Update syntex to 0.59

7 years agoFix the pub-restricted tests
est31 [Tue, 6 Jun 2017 05:00:21 +0000 (07:00 +0200)]
Fix the pub-restricted tests

7 years agoUpdate a test
Nick Cameron [Thu, 1 Jun 2017 05:34:21 +0000 (17:34 +1200)]
Update a test

7 years agoRebasing
Nick Cameron [Wed, 17 May 2017 06:57:18 +0000 (18:57 +1200)]
Rebasing

7 years agoImplement catch
topecongiro [Fri, 12 May 2017 22:28:48 +0000 (07:28 +0900)]
Implement catch

7 years agoLeave GlobalAsm and MacroDef without formatting
topecongiro [Fri, 12 May 2017 22:28:26 +0000 (07:28 +0900)]
Leave GlobalAsm and MacroDef without formatting

7 years agoFormat pub(restricted) properly
topecongiro [Fri, 12 May 2017 13:25:26 +0000 (22:25 +0900)]
Format pub(restricted) properly

7 years agoUpdate syntex_syntax
est31 [Tue, 6 Jun 2017 04:54:22 +0000 (06:54 +0200)]
Update syntex_syntax

Bases on commit to switch to libsyntax by @nrc

7 years agoMerge pull request #1634 from topecongiro/impl-rewrite-attribute
Nick Cameron [Tue, 6 Jun 2017 05:11:10 +0000 (17:11 +1200)]
Merge pull request #1634 from topecongiro/impl-rewrite-attribute

Implement Rewrite trait for syntax::ast::Attribute

7 years agoAdd 'fn_args_paren_newline = false' to rfc-rustfmt.toml
topecongiro [Tue, 6 Jun 2017 05:03:50 +0000 (14:03 +0900)]
Add 'fn_args_paren_newline = false' to rfc-rustfmt.toml

7 years agoImplement Rewrite trait for syntax::ast::Attribute
topecongiro [Mon, 5 Jun 2017 14:21:39 +0000 (23:21 +0900)]
Implement Rewrite trait for syntax::ast::Attribute

7 years agoMerge pull request #1637 from est31/master
Nick Cameron [Tue, 6 Jun 2017 04:20:16 +0000 (16:20 +1200)]
Merge pull request #1637 from est31/master

Add config options for spaces around the colon in struct literal fields

7 years agoMerge pull request #1633 from topecongiro/rfc/control-style
Nick Cameron [Tue, 6 Jun 2017 02:54:28 +0000 (14:54 +1200)]
Merge pull request #1633 from topecongiro/rfc/control-style

Do not add offset to match pattern when using Rfc style

7 years agoMerge pull request #1631 from topecongiro/fix-appveyor
Nick Cameron [Tue, 6 Jun 2017 02:53:31 +0000 (14:53 +1200)]
Merge pull request #1631 from topecongiro/fix-appveyor

Update appveyor.yml

7 years agoMerge pull request #1621 from topecongiro/combining
Nick Cameron [Tue, 6 Jun 2017 02:52:48 +0000 (14:52 +1200)]
Merge pull request #1621 from topecongiro/combining

Combine more expressions

7 years agoAdd config options for spaces around the colon in struct literal fields
est31 [Tue, 6 Jun 2017 01:11:17 +0000 (03:11 +0200)]
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.

7 years agoDo not add offset to match pattern when using Rfc style
topecongiro [Mon, 5 Jun 2017 08:57:43 +0000 (17:57 +0900)]
Do not add offset to match pattern when using Rfc style

7 years agoUpdate appveyor.yml
Seiichi Uchida [Mon, 5 Jun 2017 07:19:01 +0000 (16:19 +0900)]
Update appveyor.yml

7 years agoFormat source codes
topecongiro [Mon, 5 Jun 2017 06:32:21 +0000 (15:32 +0900)]
Format source codes

7 years agoSet combine_control_expr to false by default and true in rfc-rustfmt
topecongiro [Mon, 5 Jun 2017 06:31:44 +0000 (15:31 +0900)]
Set combine_control_expr to false by default and true in rfc-rustfmt

7 years agoAllow chain item to extend if the parent ends with closing parens and alike
topecongiro [Mon, 5 Jun 2017 06:31:05 +0000 (15:31 +0900)]
Allow chain item to extend if the parent ends with closing parens and alike

7 years agoMerge pull request #1630 from topecongiro/issue-1115
Nick Cameron [Sun, 4 Jun 2017 23:41:52 +0000 (11:41 +1200)]
Merge pull request #1630 from topecongiro/issue-1115

Allow comments after attributes on enum fields

7 years agoMerge pull request #1629 from topecongiro/issue-982
Nick Cameron [Sun, 4 Jun 2017 23:37:21 +0000 (11:37 +1200)]
Merge pull request #1629 from topecongiro/issue-982

Use recover_comment_removed in rewrite_static

7 years agoAllow comments after attributes on enum fields
topecongiro [Sun, 4 Jun 2017 14:27:21 +0000 (23:27 +0900)]
Allow comments after attributes on enum fields

7 years agoFormat source codes
topecongiro [Sun, 4 Jun 2017 06:25:07 +0000 (15:25 +0900)]
Format source codes

7 years agoForbid method chain to get combined if it uses multi line.
topecongiro [Sun, 4 Jun 2017 06:23:00 +0000 (15:23 +0900)]
Forbid method chain to get combined if it uses multi line.

If the method chain goes multi line before the last element, disallow combining
the method chain.

7 years agoAdd macro to block expr
topecongiro [Sun, 4 Jun 2017 06:21:30 +0000 (15:21 +0900)]
Add macro to block expr

7 years agoUpdate tests
topecongiro [Sat, 3 Jun 2017 13:50:55 +0000 (22:50 +0900)]
Update tests

7 years agoFormat source codes
topecongiro [Sat, 3 Jun 2017 13:50:44 +0000 (22:50 +0900)]
Format source codes

7 years agoAdd combine_control_expr option
topecongiro [Sat, 3 Jun 2017 13:50:13 +0000 (22:50 +0900)]
Add combine_control_expr option

7 years agoRefactor rewrite_call
topecongiro [Sat, 3 Jun 2017 13:49:29 +0000 (22:49 +0900)]
Refactor rewrite_call

7 years agoForbid line break between if and pattern
topecongiro [Sat, 3 Jun 2017 13:44:21 +0000 (22:44 +0900)]
Forbid line break between if and pattern

7 years agoAdd `use_block_indent` method to RewriteContext
topecongiro [Sat, 3 Jun 2017 13:43:12 +0000 (22:43 +0900)]
Add `use_block_indent` method to RewriteContext

7 years agoUse recover_comment_removed in rewrite_static
topecongiro [Sun, 4 Jun 2017 09:35:17 +0000 (18:35 +0900)]
Use recover_comment_removed in rewrite_static

7 years agoMerge pull request #1619 from topecongiro/config/format_if_else_cond_comment
Nick Cameron [Sun, 4 Jun 2017 03:26:26 +0000 (15:26 +1200)]
Merge pull request #1619 from topecongiro/config/format_if_else_cond_comment

Add format_if_else_cond_comment config option

7 years agoMerge pull request #1628 from topecongiro/issue-1113
Nick Cameron [Sat, 3 Jun 2017 23:40:37 +0000 (11:40 +1200)]
Merge pull request #1628 from topecongiro/issue-1113

Preserve the layout of comment after return type

7 years agoMerge pull request #1627 from topecongiro/issue-1624
Nick Cameron [Sat, 3 Jun 2017 23:34:25 +0000 (11:34 +1200)]
Merge pull request #1627 from topecongiro/issue-1624

Refactor vertical layout of function definition with options

7 years agoMerge pull request #1626 from topecongiro/issue-1623
Nick Cameron [Sat, 3 Jun 2017 23:32:37 +0000 (11:32 +1200)]
Merge pull request #1626 from topecongiro/issue-1623

Forbid trailing comma at the end of args of variadic functions

7 years agoPreserve the layout of comment after return type
topecongiro [Sat, 3 Jun 2017 21:29:08 +0000 (06:29 +0900)]
Preserve the layout of comment after return type

7 years agoOrganize vertical layout of function definition
Seiichi Uchida [Sat, 3 Jun 2017 14:18:39 +0000 (23:18 +0900)]
Organize vertical layout of function definition

7 years agoUse correct budget
Seiichi Uchida [Sat, 3 Jun 2017 14:17:30 +0000 (23:17 +0900)]
Use correct budget

7 years agoPut opening paren next to multi line generic
Seiichi Uchida [Sat, 3 Jun 2017 14:16:29 +0000 (23:16 +0900)]
Put opening paren next to multi line generic

7 years agoForbid trailing comma at the end of args of variadic functions
Seiichi Uchida [Sat, 3 Jun 2017 06:01:04 +0000 (15:01 +0900)]
Forbid trailing comma at the end of args of variadic functions

7 years agoUnindent comment on top of `else`
topecongiro [Fri, 2 Jun 2017 02:58:19 +0000 (11:58 +0900)]
Unindent comment on top of `else`

7 years agoFix a typo
Seiichi Uchida [Fri, 2 Jun 2017 02:20:49 +0000 (11:20 +0900)]
Fix a typo

7 years agoRename the Style::Default option to Legacy
Nick Cameron [Thu, 1 Jun 2017 23:44:38 +0000 (11:44 +1200)]
Rename the Style::Default option to Legacy

7 years agoMerge pull request #1620 from topecongiro/rfc-if
Nick Cameron [Thu, 1 Jun 2017 23:36:16 +0000 (11:36 +1200)]
Merge pull request #1620 from topecongiro/rfc-if

Use correct line budget when using Rfc control style

7 years agoUse correct one line budget when using Rfc control style
topecongiro [Thu, 1 Jun 2017 10:59:50 +0000 (19:59 +0900)]
Use correct one line budget when using Rfc control style

7 years agoMerge pull request #1616 from topecongiro/nested-closure
Nick Cameron [Thu, 1 Jun 2017 03:42:16 +0000 (15:42 +1200)]
Merge pull request #1616 from topecongiro/nested-closure

Use block indent style when visual indent style fails

7 years agoFormat source codes
Seiichi Uchida [Thu, 1 Jun 2017 03:08:09 +0000 (12:08 +0900)]
Format source codes

7 years agoUse block indent style when visual indent failed
Seiichi Uchida [Thu, 1 Jun 2017 03:07:10 +0000 (12:07 +0900)]
Use block indent style when visual indent failed

7 years agosuggested a better Sublime Text plugin
Nelo Mitranim [Wed, 31 May 2017 21:39:12 +0000 (00:39 +0300)]
suggested a better Sublime Text plugin

RustFmt is much faster than BeautifyRust and preserves scroll position

7 years agoMerge pull request #1613 from khadiwala/master
Nick Cameron [Wed, 31 May 2017 03:32:04 +0000 (15:32 +1200)]
Merge pull request #1613 from khadiwala/master

Expose methods to locate and load config

7 years agoFix typo in from_toml_path
Ravi Khadiwala [Wed, 31 May 2017 03:24:12 +0000 (22:24 -0500)]
Fix typo in from_toml_path

7 years agoExpose methods to locate and load config
Ravi Khadiwala [Wed, 31 May 2017 00:55:26 +0000 (19:55 -0500)]
Expose methods to locate and load config

* Make method for searching parents for toml file public
* Make method for loading config from path directly public, tweak the
  API since it was never returning None

7 years agoMerge pull request #1609 from topecongiro/nested-tuple
Nick Cameron [Tue, 30 May 2017 23:58:03 +0000 (11:58 +1200)]
Merge pull request #1609 from topecongiro/nested-tuple

Put a space between nested tuple field

7 years agoPut a space between nested tuple field
topecongiro [Tue, 30 May 2017 11:40:05 +0000 (20:40 +0900)]
Put a space between nested tuple field

7 years agoMerge pull request #1608 from topecongiro/issue-1598
Nick Cameron [Tue, 30 May 2017 03:28:44 +0000 (15:28 +1200)]
Merge pull request #1608 from topecongiro/issue-1598

Fix index bug in write_snippet_inner

7 years agoMerge pull request #1607 from topecongiro/many-slashes
Nick Cameron [Tue, 30 May 2017 03:28:11 +0000 (15:28 +1200)]
Merge pull request #1607 from topecongiro/many-slashes

Allow longer custom comments

7 years agoFix index bug in write_snippet_inner
topecongiro [Tue, 30 May 2017 01:53:48 +0000 (10:53 +0900)]
Fix index bug in write_snippet_inner

7 years agoAllow longer custom comment
topecongiro [Mon, 29 May 2017 23:15:12 +0000 (08:15 +0900)]
Allow longer custom comment

7 years agoMerge pull request #1604 from topecongiro/comment-group
Nick Cameron [Mon, 29 May 2017 20:53:22 +0000 (08:53 +1200)]
Merge pull request #1604 from topecongiro/comment-group

Format comments with different opening in different manner

7 years agoUse different style when rewriting comment with different opener
topecongiro [Sun, 28 May 2017 10:10:05 +0000 (19:10 +0900)]
Use different style when rewriting comment with different opener

7 years agoMerge pull request #1602 from topecongiro/attributes-on-expressions
Nick Cameron [Sun, 28 May 2017 06:34:50 +0000 (18:34 +1200)]
Merge pull request #1602 from topecongiro/attributes-on-expressions

Allow attributes on expressions