]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMerge pull request #2043 from sunjay/lift_generics
Nick Cameron [Sat, 28 Oct 2017 05:14:13 +0000 (18:14 +1300)]
Merge pull request #2043 from sunjay/lift_generics

Lifted generics to account for changes in rust-lang/rust#44766

6 years agoMerge pull request #2074 from GuillaumeGomez/emitter
Nick Cameron [Sat, 28 Oct 2017 05:12:46 +0000 (18:12 +1300)]
Merge pull request #2074 from GuillaumeGomez/emitter

Update to last Emitter update

6 years agoMerge pull request #2092 from jugglerchris/remove_unneeded_mut
Nick Cameron [Fri, 27 Oct 2017 23:44:41 +0000 (12:44 +1300)]
Merge pull request #2092 from jugglerchris/remove_unneeded_mut

Fix a "variable does not need to be mutable" warning.

6 years agoFix a "variable does not need to be mutable" warning.
Chris Emerson [Fri, 27 Oct 2017 21:57:32 +0000 (22:57 +0100)]
Fix a "variable does not need to be mutable" warning.

6 years agoMerge pull request #2091 from topecongiro/issue-2056
Nick Cameron [Fri, 27 Oct 2017 19:32:47 +0000 (08:32 +1300)]
Merge pull request #2091 from topecongiro/issue-2056

Add local dependencies to targets

6 years agoRemove iter() in for loop
topecongiro [Fri, 27 Oct 2017 16:39:01 +0000 (01:39 +0900)]
Remove iter() in for loop

6 years ago%s/std::io/io/g
topecongiro [Fri, 27 Oct 2017 16:38:28 +0000 (01:38 +0900)]
%s/std::io/io/g

6 years agoRead local dependencies from cargo metadata
topecongiro [Fri, 27 Oct 2017 16:38:04 +0000 (01:38 +0900)]
Read local dependencies from cargo metadata

6 years agoDo not use 'cargo manifest' anymore as it is deprecated
topecongiro [Fri, 27 Oct 2017 16:35:32 +0000 (01:35 +0900)]
Do not use 'cargo manifest' anymore as it is deprecated

6 years agoMerge pull request #2090 from topecongiro/issue-2087
Nick Cameron [Fri, 27 Oct 2017 09:48:13 +0000 (15:18 +0530)]
Merge pull request #2090 from topecongiro/issue-2087

Only read the trailing comma of outermost fn call

6 years agoMerge pull request #2089 from topecongiro/closure-block-body-with-comment
Nick Cameron [Fri, 27 Oct 2017 09:47:38 +0000 (15:17 +0530)]
Merge pull request #2089 from topecongiro/closure-block-body-with-comment

Fix rustfmt failing to format closure block body with comment

6 years agoMerge pull request #2041 from osa1/match_arm_newline
Nick Cameron [Fri, 27 Oct 2017 09:47:03 +0000 (15:17 +0530)]
Merge pull request #2041 from osa1/match_arm_newline

[not ready] Implement match_arm_forces_newline option (#2039)

6 years agoOnly read the trailing comma of outermost fn call
topecongiro [Fri, 27 Oct 2017 07:41:31 +0000 (16:41 +0900)]
Only read the trailing comma of outermost fn call

6 years agoAdd a test for #2087
topecongiro [Fri, 27 Oct 2017 07:35:40 +0000 (16:35 +0900)]
Add a test for #2087

6 years agoForce to use block for body of closure when it contains comment
topecongiro [Fri, 27 Oct 2017 06:41:42 +0000 (15:41 +0900)]
Force to use block for body of closure when it contains comment

6 years agoAdd a test
topecongiro [Fri, 27 Oct 2017 06:39:15 +0000 (15:39 +0900)]
Add a test

rustfmt fails to format a function call when it has a single closure argument
and that closure has a block body which contains comments at the beginnig of
the block, and the block only contains a single expression as its statement.
Phew!

6 years agoAdd Configurations.md section
Ömer Sinan Ağacan [Fri, 27 Oct 2017 05:25:14 +0000 (08:25 +0300)]
Add Configurations.md section

6 years agoMerge pull request #2084 from topecongiro/issue-2081
Nick Cameron [Thu, 26 Oct 2017 20:45:22 +0000 (02:15 +0530)]
Merge pull request #2084 from topecongiro/issue-2081

Use rewrite_assign_rhs when rewriting unit variant

6 years agoMerge pull request #2083 from topecongiro/issue-2082
Nick Cameron [Thu, 26 Oct 2017 20:44:29 +0000 (02:14 +0530)]
Merge pull request #2083 from topecongiro/issue-2082

Use a correct span for fn with pub(crate) syntax

6 years agoMerge pull request #2069 from SingingTree/log_path_str_if_after_file_errors
Nick Cameron [Thu, 26 Oct 2017 20:09:43 +0000 (01:39 +0530)]
Merge pull request #2069 from SingingTree/log_path_str_if_after_file_errors

Return a more verbose error when formatting a file fails

6 years agoMerge pull request #2068 from topecongiro/issue-2067
Nick Cameron [Thu, 26 Oct 2017 20:08:10 +0000 (01:38 +0530)]
Merge pull request #2068 from topecongiro/issue-2067

Fix a subtle bug in rewriting chain

6 years agoMerge pull request #2079 from SingingTree/issue-1979-errors-go-to-stdout
Nick Cameron [Thu, 26 Oct 2017 19:32:44 +0000 (01:02 +0530)]
Merge pull request #2079 from SingingTree/issue-1979-errors-go-to-stdout

Use stderr for various errors and warnings.

6 years agoMerge pull request #2072 from matthew-mcallister/mod-inner-skip
Nick Cameron [Thu, 26 Oct 2017 19:25:48 +0000 (00:55 +0530)]
Merge pull request #2072 from matthew-mcallister/mod-inner-skip

Handle `#![rustfmt_skip]` in more places

6 years agoMerge pull request #2070 from jugglerchris/diff_zero_context
Nick Cameron [Thu, 26 Oct 2017 19:09:21 +0000 (00:39 +0530)]
Merge pull request #2070 from jugglerchris/diff_zero_context

Fix make_diff with zero context requested

6 years agoAdd tests
Ömer Sinan Ağacan [Sun, 15 Oct 2017 11:35:20 +0000 (14:35 +0300)]
Add tests

6 years agoImplement match_arm_forces_newline option (#2039)
Ömer Sinan Ağacan [Sat, 7 Oct 2017 12:44:28 +0000 (15:44 +0300)]
Implement match_arm_forces_newline option (#2039)

6 years agoUse stderr for various errors and warnings.
Bryce Van Dyk [Mon, 23 Oct 2017 02:17:30 +0000 (15:17 +1300)]
Use stderr for various errors and warnings.

Adjusts several error and warning report cases to output using eprintln!
instead of println! so that messages are sent to stderr.

6 years agoUse rewrite_assign_rhs when rewriting unit variant
topecongiro [Tue, 24 Oct 2017 16:08:32 +0000 (01:08 +0900)]
Use rewrite_assign_rhs when rewriting unit variant

6 years agoUse a correct span for fn with pub(crate) syntax
topecongiro [Tue, 24 Oct 2017 15:51:04 +0000 (00:51 +0900)]
Use a correct span for fn with pub(crate) syntax

6 years agoMerge pull request #2077 from djanderson/patch-1
Seiichi Uchida [Tue, 24 Oct 2017 14:48:36 +0000 (23:48 +0900)]
Merge pull request #2077 from djanderson/patch-1

Fix typo in --config-help "funciton" -> "function"

6 years agoFix typo in --config-help "funciton" -> "function"
Douglas Anderson [Sun, 22 Oct 2017 06:47:45 +0000 (00:47 -0600)]
Fix typo in --config-help "funciton" -> "function"

6 years agoUpdate to last Emitter update
Guillaume Gomez [Fri, 20 Oct 2017 13:53:06 +0000 (15:53 +0200)]
Update to last Emitter update

6 years agoHandle `#![rustfmt_skip]` in block statements
Matthew McAllister [Fri, 20 Oct 2017 09:34:12 +0000 (02:34 -0700)]
Handle `#![rustfmt_skip]` in block statements

6 years agoHandle `#![rustfmt_skip]` at file top level
Matthew McAllister [Fri, 20 Oct 2017 06:58:24 +0000 (23:58 -0700)]
Handle `#![rustfmt_skip]` at file top level

6 years agoMerge pull request #2048 from japaric/required-version
Nick Cameron [Fri, 20 Oct 2017 05:53:27 +0000 (11:23 +0530)]
Merge pull request #2048 from japaric/required-version

add `required-version` option to rustfmt.toml

6 years agoReturn a more verbose error when formatting a file fails
Bryce Van Dyk [Thu, 19 Oct 2017 09:52:12 +0000 (22:52 +1300)]
Return a more verbose error when formatting a file fails

Expands the error message returned if the after_file function fails to
also include path_str. This allows users to better identify files that are
not being formatted.

6 years agoRun rustfmt on the new changes.
Chris Emerson [Thu, 19 Oct 2017 22:32:27 +0000 (23:32 +0100)]
Run rustfmt on the new changes.

6 years agoAdd a couple of special cases which fix the zero-context diff case.
Chris Emerson [Thu, 19 Oct 2017 22:14:20 +0000 (23:14 +0100)]
Add a couple of special cases which fix the zero-context diff case.

6 years agoAdd a test for two nearby chunks (with context).
Chris Emerson [Thu, 19 Oct 2017 22:03:27 +0000 (23:03 +0100)]
Add a test for two nearby chunks (with context).

6 years agoAdd a failing test of zero context.
Chris Emerson [Thu, 19 Oct 2017 19:55:20 +0000 (20:55 +0100)]
Add a failing test of zero context.

6 years agoAdd a simple passing test for diffs.
Chris Emerson [Thu, 19 Oct 2017 19:49:33 +0000 (20:49 +0100)]
Add a simple passing test for diffs.

6 years agoAdd a test for #2067
topecongiro [Wed, 18 Oct 2017 13:02:05 +0000 (22:02 +0900)]
Add a test for #2067

6 years agoCargo fmt
topecongiro [Wed, 18 Oct 2017 13:01:59 +0000 (22:01 +0900)]
Cargo fmt

6 years agoTake the width of trailing '?'s into account
topecongiro [Wed, 18 Oct 2017 12:58:47 +0000 (21:58 +0900)]
Take the width of trailing '?'s into account

6 years agoDo not distinguish between a single-child chain from others
topecongiro [Wed, 18 Oct 2017 12:55:45 +0000 (21:55 +0900)]
Do not distinguish between a single-child chain from others

`last_shape` is used when rewriting the last child on its own line.

6 years agoUse trimmed_last_line_width()
topecongiro [Wed, 18 Oct 2017 12:52:02 +0000 (21:52 +0900)]
Use trimmed_last_line_width()

6 years agoUpdated rustfmt to account for changes from rust-lang/rust#44766
Sunjay Varma [Sun, 15 Oct 2017 17:28:00 +0000 (13:28 -0400)]
Updated rustfmt to account for changes from rust-lang/rust#44766

6 years agoMerge pull request #2064 from topecongiro/issue-2063
Nick Cameron [Tue, 17 Oct 2017 09:40:54 +0000 (15:10 +0530)]
Merge pull request #2064 from topecongiro/issue-2063

Take width of return type into account for body shape of closure

6 years agoFix a typo
Seiichi Uchida [Tue, 17 Oct 2017 02:13:20 +0000 (11:13 +0900)]
Fix a typo

6 years agoMerge pull request #2060 from tamird/doc-dump-default-config
Nick Cameron [Mon, 16 Oct 2017 15:29:30 +0000 (22:29 +0700)]
Merge pull request #2060 from tamird/doc-dump-default-config

Document `--dump-default-config` in README.md

6 years agoMerge pull request #2058 from BenjaminGill-Metaswitch/patch-1
Nick Cameron [Mon, 16 Oct 2017 15:26:10 +0000 (22:26 +0700)]
Merge pull request #2058 from BenjaminGill-Metaswitch/patch-1

Add crates.io version shield

6 years agoAdd a test for #2063
Seiichi Uchida [Mon, 16 Oct 2017 15:12:22 +0000 (00:12 +0900)]
Add a test for #2063

6 years agoTake width of return type into account
Seiichi Uchida [Mon, 16 Oct 2017 15:10:19 +0000 (00:10 +0900)]
Take width of return type into account

6 years agonightly-0.2.9
Seiichi Uchida [Mon, 16 Oct 2017 03:23:40 +0000 (12:23 +0900)]
nightly-0.2.9

6 years agoCargo update
Seiichi Uchida [Mon, 16 Oct 2017 03:23:13 +0000 (12:23 +0900)]
Cargo update

6 years agocorrect --dump-default-config usage string
Tamir Duberstein [Sat, 14 Oct 2017 12:08:52 +0000 (08:08 -0400)]
correct --dump-default-config usage string

6 years agoDocument `--dump-default-config` in README.md
Saulo Silva [Tue, 19 Sep 2017 02:56:49 +0000 (22:56 -0400)]
Document `--dump-default-config` in README.md

Fixes #317.

6 years agoMerge pull request #2047 from japaric/dump-default-config-2
Nick Cameron [Fri, 13 Oct 2017 14:06:15 +0000 (22:06 +0800)]
Merge pull request #2047 from japaric/dump-default-config-2

output --dump-default-config to stdout if no path is given

6 years agoMerge pull request #2042 from topecongiro/refactoring
Nick Cameron [Fri, 13 Oct 2017 14:00:10 +0000 (22:00 +0800)]
Merge pull request #2042 from topecongiro/refactoring

Refactorings

6 years agoMerge pull request #2045 from topecongiro/issue-2044
Nick Cameron [Fri, 13 Oct 2017 13:59:13 +0000 (21:59 +0800)]
Merge pull request #2045 from topecongiro/issue-2044

Simplify multiline case in rewrite_struct_field()

6 years agoAdd crates.io version shield
Benjamin Gill [Fri, 13 Oct 2017 10:46:00 +0000 (11:46 +0100)]
Add crates.io version shield

6 years agoMerge pull request #2051 from petrochenkov/dyn
Seiichi Uchida [Fri, 13 Oct 2017 10:18:05 +0000 (19:18 +0900)]
Merge pull request #2051 from petrochenkov/dyn

Fix breakage from `dyn Trait`

6 years agodefault required-version to the current rustfmt version
Jorge Aparicio [Tue, 10 Oct 2017 20:37:47 +0000 (22:37 +0200)]
default required-version to the current rustfmt version

6 years agorun cargo fmt
Jorge Aparicio [Tue, 10 Oct 2017 20:36:41 +0000 (22:36 +0200)]
run cargo fmt

6 years agoFix breakage from `dyn Trait`
Vadim Petrochenkov [Tue, 10 Oct 2017 18:20:57 +0000 (21:20 +0300)]
Fix breakage from `dyn Trait`

6 years agoMerge pull request #2049 from SingingTree/issue-1211-test
Seiichi Uchida [Tue, 10 Oct 2017 07:16:09 +0000 (16:16 +0900)]
Merge pull request #2049 from SingingTree/issue-1211-test

Add a test for issue 1211, showing it's no longer an issue.

6 years agoAdd a test for issue 1211, showing it's no longer an issue.
Bryce Van Dyk [Tue, 10 Oct 2017 05:51:44 +0000 (18:51 +1300)]
Add a test for issue 1211, showing it's no longer an issue.

Since rustfmt has moved away from syntex the overflow seen in issue 1211
is no longer a problem. This commit adds a test to verify that.

6 years agoadd `required-version` option to rustfmt.toml
Jorge Aparicio [Mon, 9 Oct 2017 21:07:53 +0000 (23:07 +0200)]
add `required-version` option to rustfmt.toml

This option specifies the rustfmt version that *must* be used to format the code. Trying to use a
different version raises an error.

closes #1505

6 years agooutput --dump-default-config to stdout if no path is given
Jorge Aparicio [Mon, 9 Oct 2017 18:56:16 +0000 (20:56 +0200)]
output --dump-default-config to stdout if no path is given

closes #1988

6 years agoFix a typo
Seiichi Uchida [Mon, 9 Oct 2017 13:44:00 +0000 (22:44 +0900)]
Fix a typo

6 years agoAdd a test for #2044
Seiichi Uchida [Sun, 8 Oct 2017 13:37:13 +0000 (22:37 +0900)]
Add a test for #2044

6 years agoSimplify multiline case in rewrite_struct_field()
Seiichi Uchida [Sun, 8 Oct 2017 13:36:03 +0000 (22:36 +0900)]
Simplify multiline case in rewrite_struct_field()

6 years agoGet rid of rewrite_struct_field_type()
Seiichi Uchida [Sun, 8 Oct 2017 13:35:45 +0000 (22:35 +0900)]
Get rid of rewrite_struct_field_type()

6 years agoRun cargo fmt
Seiichi Uchida [Sat, 7 Oct 2017 13:38:32 +0000 (22:38 +0900)]
Run cargo fmt

rustfmt removes trailing comma from a function call. This could be a bug.

6 years agoUpdate doc comments in chains.rs
Seiichi Uchida [Sat, 7 Oct 2017 13:31:38 +0000 (22:31 +0900)]
Update doc comments in chains.rs

6 years agoSimplify join_rewrites()
Seiichi Uchida [Sat, 7 Oct 2017 13:30:12 +0000 (22:30 +0900)]
Simplify join_rewrites()

6 years agoGet rid of choose_first_connector()
Seiichi Uchida [Sat, 7 Oct 2017 13:29:53 +0000 (22:29 +0900)]
Get rid of choose_first_connector()

6 years agoChange return type of Indent::to_string() to Cow<'static, str>
Seiichi Uchida [Sat, 7 Oct 2017 13:21:53 +0000 (22:21 +0900)]
Change return type of Indent::to_string() to Cow<'static, str>

6 years agoFaster last_line_extendable()
Seiichi Uchida [Sat, 7 Oct 2017 13:17:01 +0000 (22:17 +0900)]
Faster last_line_extendable()

6 years agoSimplify wrap_str()
Seiichi Uchida [Sat, 7 Oct 2017 13:14:33 +0000 (22:14 +0900)]
Simplify wrap_str()

6 years agoChange the signature of wrap_str()
Seiichi Uchida [Sat, 7 Oct 2017 13:04:02 +0000 (22:04 +0900)]
Change the signature of wrap_str()

6 years agoRemove calling rewrite() against String
Seiichi Uchida [Sat, 7 Oct 2017 13:01:44 +0000 (22:01 +0900)]
Remove calling rewrite() against String

6 years agoRemove String::rewrite()
Seiichi Uchida [Sat, 7 Oct 2017 12:58:29 +0000 (21:58 +0900)]
Remove String::rewrite()

6 years agoRun wrap_str() only when chain_indent is set to "Visual"
Seiichi Uchida [Sat, 7 Oct 2017 12:51:15 +0000 (21:51 +0900)]
Run wrap_str() only when chain_indent is set to "Visual"

6 years agoFix a typo
Seiichi Uchida [Sat, 7 Oct 2017 12:48:45 +0000 (21:48 +0900)]
Fix a typo

6 years agoUse correct budget for the last child of chain
Seiichi Uchida [Sat, 7 Oct 2017 12:48:05 +0000 (21:48 +0900)]
Use correct budget for the last child of chain

6 years agoMerge pull request #2038 from jugglerchris/add_test_skip_attr
Nick Cameron [Sat, 7 Oct 2017 05:19:15 +0000 (13:19 +0800)]
Merge pull request #2038 from jugglerchris/add_test_skip_attr

Add a test that the skip attribute applies to other attributes.

6 years agoMerge pull request #2028 from wada314/win-test-crlf
Nick Cameron [Sat, 7 Oct 2017 05:12:16 +0000 (13:12 +0800)]
Merge pull request #2028 from wada314/win-test-crlf

Fix the test framework is failing in CRLF env.

6 years agoAdd a test that the skip attribute applies to other attributes.
Chris Emerson [Fri, 6 Oct 2017 21:57:59 +0000 (22:57 +0100)]
Add a test that the skip attribute applies to other attributes.

6 years agoFix the test framework is failing in CRLF env
Shohei Wada [Fri, 6 Oct 2017 16:53:55 +0000 (01:53 +0900)]
Fix the test framework is failing in CRLF env

6 years agoMerge pull request #2035 from topecongiro/deprecate-try_opt!
Nick Cameron [Thu, 5 Oct 2017 12:45:52 +0000 (20:45 +0800)]
Merge pull request #2035 from topecongiro/deprecate-try_opt!

Replace `try_opt!` macro with a `?` operator

6 years agoMerge pull request #2029 from wada314/fix-crlf
Nick Cameron [Thu, 5 Oct 2017 12:07:29 +0000 (20:07 +0800)]
Merge pull request #2029 from wada314/fix-crlf

Fix broken tests under CRLF environment.

6 years agoUse push_str() instead of write!()
topecongiro [Thu, 5 Oct 2017 12:05:28 +0000 (21:05 +0900)]
Use push_str() instead of write!()

6 years agoUpdate Contributing.md
topecongiro [Thu, 5 Oct 2017 11:50:50 +0000 (20:50 +0900)]
Update Contributing.md

6 years agoReplace 'try_opt!' macro with a '?' operator
topecongiro [Thu, 5 Oct 2017 11:50:19 +0000 (20:50 +0900)]
Replace 'try_opt!' macro with a '?' operator

6 years agoMerge pull request #2032 from topecongiro/trailing-whitespaces-in-macro-def
Nick Cameron [Thu, 5 Oct 2017 11:34:12 +0000 (19:34 +0800)]
Merge pull request #2032 from topecongiro/trailing-whitespaces-in-macro-def

Remove trailing whitespaces in macro def

6 years agoAdd a test
topecongiro [Thu, 5 Oct 2017 10:44:45 +0000 (19:44 +0900)]
Add a test

6 years agoMerge pull request #2023 from topecongiro/issue-2020
Nick Cameron [Thu, 5 Oct 2017 10:09:49 +0000 (18:09 +0800)]
Merge pull request #2023 from topecongiro/issue-2020

Use a correct budget for where predicate

6 years agoMerge pull request #2019 from topecongiro/issue-2018
Nick Cameron [Thu, 5 Oct 2017 09:30:45 +0000 (17:30 +0800)]
Merge pull request #2019 from topecongiro/issue-2018

Break after '=' if a single line rhs exceeds max width

6 years agoMerge pull request #2017 from topecongiro/issue-1987
Nick Cameron [Thu, 5 Oct 2017 09:27:17 +0000 (17:27 +0800)]
Merge pull request #2017 from topecongiro/issue-1987

Format strings in attributes when `format_strings = true`