]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoRemove `match_pattern_separator_break_point` in favour of `binop_separator`
Nick Cameron [Fri, 24 Nov 2017 01:01:44 +0000 (14:01 +1300)]
Remove `match_pattern_separator_break_point` in favour of `binop_separator`

6 years agoRemove legacy option `fn_args_paren_newline`
Nick Cameron [Fri, 24 Nov 2017 00:27:14 +0000 (13:27 +1300)]
Remove legacy option `fn_args_paren_newline`

6 years agoRemove legacy option `fn_return_indent`
Nick Cameron [Fri, 24 Nov 2017 00:19:36 +0000 (13:19 +1300)]
Remove legacy option `fn_return_indent`

6 years agoRemove unused option `take_source_hints`
Nick Cameron [Fri, 24 Nov 2017 00:08:02 +0000 (13:08 +1300)]
Remove unused option `take_source_hints`

6 years agoMerge pull request #2181 from topecongiro/issue-2111
Nick Cameron [Thu, 23 Nov 2017 22:03:00 +0000 (11:03 +1300)]
Merge pull request #2181 from topecongiro/issue-2111

Use vertical layout when there are single line comments in import

6 years agoUpdate tests
topecongiro [Thu, 23 Nov 2017 03:39:00 +0000 (12:39 +0900)]
Update tests

6 years agoAlign post comments with items when the it starts with newline
topecongiro [Thu, 23 Nov 2017 03:38:34 +0000 (12:38 +0900)]
Align post comments with items when the it starts with newline

6 years agoForce vertical layout when we find any kind of single line comments
topecongiro [Thu, 23 Nov 2017 03:37:12 +0000 (12:37 +0900)]
Force vertical layout when we find any kind of single line comments

6 years agoAdd a test for #2111
topecongiro [Thu, 23 Nov 2017 03:36:57 +0000 (12:36 +0900)]
Add a test for #2111

6 years agoRemove some out of date text from README.md
Nick Cameron [Tue, 21 Nov 2017 18:25:36 +0000 (07:25 +1300)]
Remove some out of date text from README.md

6 years agoMerge pull request #2174 from topecongiro/changelog
Nick Cameron [Tue, 21 Nov 2017 02:33:03 +0000 (15:33 +1300)]
Merge pull request #2174 from topecongiro/changelog

Update changelog

6 years agoUpdate changelog
topecongiro [Wed, 15 Nov 2017 03:46:51 +0000 (12:46 +0900)]
Update changelog

6 years ago0.2.16
Nick Cameron [Mon, 20 Nov 2017 20:43:33 +0000 (09:43 +1300)]
0.2.16

6 years agoMerge pull request #2172 from topecongiro/issue-2171
Nick Cameron [Mon, 20 Nov 2017 18:07:12 +0000 (07:07 +1300)]
Merge pull request #2172 from topecongiro/issue-2171

Do not squash unsafe block on closure body

6 years agoDo not squash unsafe block
topecongiro [Mon, 20 Nov 2017 07:38:29 +0000 (16:38 +0900)]
Do not squash unsafe block

6 years agoAdd a test for #2171
topecongiro [Mon, 20 Nov 2017 07:38:15 +0000 (16:38 +0900)]
Add a test for #2171

6 years agoMerge pull request #2161 from topecongiro/issue-1807
Nick Cameron [Mon, 20 Nov 2017 01:51:53 +0000 (14:51 +1300)]
Merge pull request #2161 from topecongiro/issue-1807

Implement RFC style for match pattern

6 years agoMerge pull request #2162 from utkarshkukreti/issue-1753
Nick Cameron [Mon, 20 Nov 2017 01:45:07 +0000 (14:45 +1300)]
Merge pull request #2162 from utkarshkukreti/issue-1753

Fix missing trailing newline in --write-mode=diff.

6 years agoMerge pull request #2165 from topecongiro/issue-2164
Nick Cameron [Sun, 19 Nov 2017 22:51:20 +0000 (11:51 +1300)]
Merge pull request #2165 from topecongiro/issue-2164

Handle large types on struct fields

6 years agoMerge pull request #2167 from djc/patch-1
Nick Cameron [Sun, 19 Nov 2017 22:33:12 +0000 (11:33 +1300)]
Merge pull request #2167 from djc/patch-1

Fix typo in Configurations docs

6 years agoFix typo in Configurations docs
Dirkjan Ochtman [Sun, 19 Nov 2017 20:14:54 +0000 (21:14 +0100)]
Fix typo in Configurations docs

6 years agoUpdate a test
topecongiro [Sat, 18 Nov 2017 06:45:15 +0000 (15:45 +0900)]
Update a test

6 years agoHandle multi-lined fn signature
topecongiro [Sat, 18 Nov 2017 06:44:49 +0000 (15:44 +0900)]
Handle multi-lined fn signature

6 years agoUse choose_rhs() for the layout of multi-lined struct field
topecongiro [Sat, 18 Nov 2017 06:43:33 +0000 (15:43 +0900)]
Use choose_rhs() for the layout of multi-lined struct field

6 years agoAdd a test for #2164
topecongiro [Sat, 18 Nov 2017 06:32:10 +0000 (15:32 +0900)]
Add a test for #2164

6 years agoAdd test for trailing newline in diff.
Utkarsh Kukreti [Fri, 17 Nov 2017 15:16:17 +0000 (20:46 +0530)]
Add test for trailing newline in diff.

Credits to @afshinm for most of the code.

6 years agoFix checkstyle test.
Utkarsh Kukreti [Fri, 17 Nov 2017 04:13:47 +0000 (09:43 +0530)]
Fix checkstyle test.

The only reason it passed before was due to a bug in the `diff` crate.
The diff was empty even though the contents of the files were different --
namely one string had a trailing newline character while the other didn't.
Now both have a trailing newline character.

6 years agoFix missing trailing newline in --write-mode=diff.
Utkarsh Kukreti [Fri, 17 Nov 2017 03:20:00 +0000 (08:50 +0530)]
Fix missing trailing newline in --write-mode=diff.

This was a bug in the `diff` crate which has been fixed in 0.1.11. This PR
simply bumps `diff` to that version.

Fixes #1753.

    $ xxd main.rs
    00000000: 666e 206d 6169 6e28 2920 7b7d            fn main() {}
    $ cargo run --bin rustfmt -- main.rs --write-mode=diff
    $ echo $?
    0
    $ git checkout issue-1753
    Switched to branch 'issue-1753'
    $ cargo run --bin rustfmt -- main.rs --write-mode=diff
    Diff in /Users/utkarsh/dev/git/rustfmt/main.rs at line 1:
     fn main() {}⏎
    +⏎
    $ echo $?
    4

6 years agoUse mixed layout for patterns that are all short
topecongiro [Thu, 16 Nov 2017 08:40:33 +0000 (17:40 +0900)]
Use mixed layout for patterns that are all short

6 years agoAdd is_short_pattern()
topecongiro [Thu, 16 Nov 2017 08:40:24 +0000 (17:40 +0900)]
Add is_short_pattern()

6 years agoFix up write_list() to handle Mixed tactic
topecongiro [Thu, 16 Nov 2017 08:39:38 +0000 (17:39 +0900)]
Fix up write_list() to handle Mixed tactic

6 years agoGeneralize ListItems to allow a separator other than comma
topecongiro [Thu, 16 Nov 2017 08:38:12 +0000 (17:38 +0900)]
Generalize ListItems to allow a separator other than comma

6 years agoUpdate a test for #1807
topecongiro [Thu, 16 Nov 2017 08:37:01 +0000 (17:37 +0900)]
Update a test for #1807

6 years agoUpdate tests
topecongiro [Thu, 16 Nov 2017 07:42:11 +0000 (16:42 +0900)]
Update tests

6 years agoCargo fmt
topecongiro [Thu, 16 Nov 2017 07:42:07 +0000 (16:42 +0900)]
Cargo fmt

6 years agoBreak before '|' for multi-lined match arm pattern
topecongiro [Thu, 16 Nov 2017 07:41:09 +0000 (16:41 +0900)]
Break before '|' for multi-lined match arm pattern

6 years agoMerge pull request #2160 from topecongiro/issue-1809
Nick Cameron [Thu, 16 Nov 2017 07:59:17 +0000 (20:59 +1300)]
Merge pull request #2160 from topecongiro/issue-1809

Force vertical layout for all variants if one of then use multiple lines

6 years agoCargo fmr & update tests
topecongiro [Thu, 16 Nov 2017 07:07:15 +0000 (16:07 +0900)]
Cargo fmr & update tests

Note that we are forcing vertical layout when there are attributes on top of a
variant.

6 years agoForce vertical layout for all variants if one of then use multiple lines
topecongiro [Thu, 16 Nov 2017 07:02:01 +0000 (16:02 +0900)]
Force vertical layout for all variants if one of then use multiple lines

6 years agoAdd a test for #1809
topecongiro [Thu, 16 Nov 2017 07:01:50 +0000 (16:01 +0900)]
Add a test for #1809

6 years agoMerge pull request #2159 from topecongiro/issue-2158
Nick Cameron [Thu, 16 Nov 2017 02:59:32 +0000 (15:59 +1300)]
Merge pull request #2159 from topecongiro/issue-2158

Prevent long associated type from overflowing max width

6 years agoUse rewrite_assign_rhs() when rewriting associated type
topecongiro [Thu, 16 Nov 2017 02:27:11 +0000 (11:27 +0900)]
Use rewrite_assign_rhs() when rewriting associated type

6 years agoGeneralize rewrite_assign_rhs()
topecongiro [Thu, 16 Nov 2017 02:26:36 +0000 (11:26 +0900)]
Generalize rewrite_assign_rhs()

6 years agoAdd a test for #2158
topecongiro [Thu, 16 Nov 2017 02:26:12 +0000 (11:26 +0900)]
Add a test for #2158

6 years agoMerge pull request #2155 from topecongiro/issue-1603
Nick Cameron [Wed, 15 Nov 2017 08:17:33 +0000 (21:17 +1300)]
Merge pull request #2155 from topecongiro/issue-1603

Prevent panicking by a nested comment

6 years agoDo not get tricked by a nested comment
topecongiro [Wed, 15 Nov 2017 06:46:00 +0000 (15:46 +0900)]
Do not get tricked by a nested comment

6 years agoAdd a test for #1603
topecongiro [Wed, 15 Nov 2017 06:44:27 +0000 (15:44 +0900)]
Add a test for #1603

6 years agoUpdate README.md
Seiichi Uchida [Wed, 15 Nov 2017 06:19:32 +0000 (15:19 +0900)]
Update README.md

6 years agoMerge pull request #2154 from topecongiro/issue-2151
Nick Cameron [Wed, 15 Nov 2017 03:46:15 +0000 (16:46 +1300)]
Merge pull request #2154 from topecongiro/issue-2151

Look for a newline after match arm only when there is one

6 years agoUpdate tests
topecongiro [Wed, 15 Nov 2017 01:56:26 +0000 (10:56 +0900)]
Update tests

6 years agoLook for a newline after match arm only when there is one
topecongiro [Wed, 15 Nov 2017 01:55:40 +0000 (10:55 +0900)]
Look for a newline after match arm only when there is one

6 years agoAdd a test for #2151
topecongiro [Wed, 15 Nov 2017 01:44:51 +0000 (10:44 +0900)]
Add a test for #2151

6 years agoMerge pull request #2153 from topecongiro/issue-2152
Nick Cameron [Wed, 15 Nov 2017 02:43:03 +0000 (15:43 +1300)]
Merge pull request #2153 from topecongiro/issue-2152

Return None when a literal exceeds budget

6 years agoMerge pull request #2150 from topecongiro/audit-options/space
Nick Cameron [Wed, 15 Nov 2017 01:52:38 +0000 (14:52 +1300)]
Merge pull request #2150 from topecongiro/audit-options/space

Combine spacing-related config options into a single general one

6 years agoReturn None when a literal exceeds budget
topecongiro [Wed, 15 Nov 2017 01:36:49 +0000 (10:36 +0900)]
Return None when a literal exceeds budget

6 years agoAdd a test for #2152
topecongiro [Wed, 15 Nov 2017 01:36:42 +0000 (10:36 +0900)]
Add a test for #2152

6 years agoUpdate Configurations.md
topecongiro [Tue, 14 Nov 2017 14:47:30 +0000 (23:47 +0900)]
Update Configurations.md

6 years agoCombine spaces_within_parens and spaces_within_brackets
topecongiro [Tue, 14 Nov 2017 14:42:31 +0000 (23:42 +0900)]
Combine spaces_within_parens and spaces_within_brackets

6 years agoFix typos
topecongiro [Tue, 14 Nov 2017 14:41:33 +0000 (23:41 +0900)]
Fix typos

6 years agoUpdate tests related to spaces with parens and brackets
topecongiro [Tue, 14 Nov 2017 14:37:27 +0000 (23:37 +0900)]
Update tests related to spaces with parens and brackets

6 years agoUse space_before_colon and space_after_colon
topecongiro [Tue, 14 Nov 2017 14:25:36 +0000 (23:25 +0900)]
Use space_before_colon and space_after_colon

6 years agoUpdate tests related to colon spacing
topecongiro [Tue, 14 Nov 2017 14:25:10 +0000 (23:25 +0900)]
Update tests related to colon spacing

6 years agoMerge pull request #2148 from topecongiro/audit-option/brace_style
Nick Cameron [Tue, 14 Nov 2017 03:57:09 +0000 (16:57 +1300)]
Merge pull request #2148 from topecongiro/audit-option/brace_style

Combine fn_brace_style and item_brace_style

6 years agoMerge pull request #2137 from clippered/add-color-cli-option
Nick Cameron [Tue, 14 Nov 2017 02:11:31 +0000 (15:11 +1300)]
Merge pull request #2137 from clippered/add-color-cli-option

add cli option for color

6 years agoUpdate Configurations.md
topecongiro [Tue, 14 Nov 2017 01:49:18 +0000 (10:49 +0900)]
Update Configurations.md

6 years agoCombine fn_brace_style and item_brace_style
topecongiro [Tue, 14 Nov 2017 01:47:02 +0000 (10:47 +0900)]
Combine fn_brace_style and item_brace_style

6 years agoMerge pull request #2147 from topecongiro/audit-options/indent_style
Nick Cameron [Tue, 14 Nov 2017 00:50:43 +0000 (13:50 +1300)]
Merge pull request #2147 from topecongiro/audit-options/indent_style

Use 'indent_style' for all indent related settings

6 years agoRemove duplicated 'indent_style' section
topecongiro [Tue, 14 Nov 2017 00:31:50 +0000 (09:31 +0900)]
Remove duplicated 'indent_style' section

6 years agorename to use_colored_tty; used match as well
clippered [Mon, 13 Nov 2017 09:10:46 +0000 (20:10 +1100)]
rename to use_colored_tty; used match as well

6 years agoadd cli option for color
clippered [Thu, 9 Nov 2017 20:23:12 +0000 (07:23 +1100)]
add cli option for color

6 years agoFix chains-visual test
topecongiro [Mon, 13 Nov 2017 08:37:56 +0000 (17:37 +0900)]
Fix chains-visual test

6 years agoUpdate Configurations.md
topecongiro [Mon, 13 Nov 2017 07:52:40 +0000 (16:52 +0900)]
Update Configurations.md

6 years agoReplace '*_indent' with 'indent_style' in src
topecongiro [Mon, 13 Nov 2017 07:42:29 +0000 (16:42 +0900)]
Replace '*_indent' with 'indent_style' in src

6 years agoUpdate legacy-rustfmt.toml
topecongiro [Mon, 13 Nov 2017 07:42:15 +0000 (16:42 +0900)]
Update legacy-rustfmt.toml

6 years agoUpdate tests
topecongiro [Mon, 13 Nov 2017 07:42:04 +0000 (16:42 +0900)]
Update tests

6 years agoRemove redundant options
topecongiro [Mon, 13 Nov 2017 07:41:51 +0000 (16:41 +0900)]
Remove redundant options

6 years agoChange chain_indent to indent_style
topecongiro [Mon, 13 Nov 2017 07:25:50 +0000 (16:25 +0900)]
Change chain_indent to indent_style

6 years agoChange Legacy to Visual
topecongiro [Mon, 13 Nov 2017 07:23:21 +0000 (16:23 +0900)]
Change Legacy to Visual

6 years agoChange Rfc to Block
topecongiro [Mon, 13 Nov 2017 07:22:09 +0000 (16:22 +0900)]
Change Rfc to Block

6 years agoRecover imports_indent
topecongiro [Mon, 13 Nov 2017 07:20:44 +0000 (16:20 +0900)]
Recover imports_indent

6 years agoReplace '_indent' with 'indent_style'
topecongiro [Mon, 13 Nov 2017 07:09:59 +0000 (16:09 +0900)]
Replace '_indent' with 'indent_style'

6 years agoAdd a test for #1524
Nick Cameron [Mon, 13 Nov 2017 03:51:28 +0000 (16:51 +1300)]
Add a test for #1524

6 years agoCollapse multiple blocks in closures
Nick Cameron [Mon, 13 Nov 2017 03:45:54 +0000 (16:45 +1300)]
Collapse multiple blocks in closures

Fixes #1524

6 years agoMore closures refactoring
Nick Cameron [Mon, 13 Nov 2017 03:07:34 +0000 (16:07 +1300)]
More closures refactoring

6 years agoremove closure_block_indent_threshold option
Nick Cameron [Mon, 13 Nov 2017 02:40:16 +0000 (15:40 +1300)]
remove closure_block_indent_threshold option

6 years agoMerge pull request #2146 from topecongiro/where-on-unit-struct
Nick Cameron [Mon, 13 Nov 2017 02:28:32 +0000 (15:28 +1300)]
Merge pull request #2146 from topecongiro/where-on-unit-struct

Format where clause on unit struct

6 years agoExtract a closures module
Nick Cameron [Mon, 13 Nov 2017 02:26:33 +0000 (15:26 +1300)]
Extract a closures module

6 years agoSome basic refactoring
Nick Cameron [Mon, 13 Nov 2017 02:13:23 +0000 (15:13 +1300)]
Some basic refactoring

6 years agoFormat where clause on unit struct
topecongiro [Mon, 13 Nov 2017 02:07:09 +0000 (11:07 +0900)]
Format where clause on unit struct

6 years agoAdd BracePos
topecongiro [Mon, 13 Nov 2017 02:06:53 +0000 (11:06 +0900)]
Add BracePos

6 years agoAdd a test for where clause on unit struct
topecongiro [Mon, 13 Nov 2017 02:06:09 +0000 (11:06 +0900)]
Add a test for where clause on unit struct

6 years agoMerge pull request #2145 from topecongiro/issue-2144
Nick Cameron [Mon, 13 Nov 2017 00:01:37 +0000 (13:01 +1300)]
Merge pull request #2145 from topecongiro/issue-2144

Format generics on unit struct

6 years agoMerge pull request #2140 from topecongiro/issue-2021
Nick Cameron [Sun, 12 Nov 2017 23:21:16 +0000 (12:21 +1300)]
Merge pull request #2140 from topecongiro/issue-2021

Return 'None' when macro or string literal exceeds max width

6 years agoCargo clippy
topecongiro [Sun, 12 Nov 2017 23:02:23 +0000 (08:02 +0900)]
Cargo clippy

6 years agoFormat generics on unit struct
topecongiro [Sun, 12 Nov 2017 23:02:06 +0000 (08:02 +0900)]
Format generics on unit struct

6 years agoAdd a test for #2144
topecongiro [Sun, 12 Nov 2017 23:01:52 +0000 (08:01 +0900)]
Add a test for #2144

6 years agoMerge pull request #2143 from davidalber/add-combine-control-expr-example
Seiichi Uchida [Sun, 12 Nov 2017 22:44:37 +0000 (07:44 +0900)]
Merge pull request #2143 from davidalber/add-combine-control-expr-example

Adding an example for `combine_control_expr = false`

6 years agoAdding an example for `combine_control_expr = false`
David Alber [Sun, 12 Nov 2017 18:14:00 +0000 (10:14 -0800)]
Adding an example for `combine_control_expr = false`

Fixes #2132.

6 years agoMerge pull request #2142 from davidalber/fix-where-density-examples
Seiichi Uchida [Sun, 12 Nov 2017 11:20:17 +0000 (20:20 +0900)]
Merge pull request #2142 from davidalber/fix-where-density-examples

Updating `where_density = "Vertical"` example

6 years agoUpdating `where_density = "Vertical"` example
David Alber [Sun, 12 Nov 2017 08:16:24 +0000 (00:16 -0800)]
Updating `where_density = "Vertical"` example

The example for `where_density = "Vertical"` does not match the
current output from rustfmt. This change corrects that.

Fixes #2133.