]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMerge pull request #2298 from davidalber/fix-2269
Nick Cameron [Fri, 22 Dec 2017 08:55:07 +0000 (21:55 +1300)]
Merge pull request #2298 from davidalber/fix-2269

Adding --version to cargo-fmt

6 years agoUpdate CHANGELOG
topecongiro [Fri, 22 Dec 2017 08:20:15 +0000 (17:20 +0900)]
Update CHANGELOG

6 years agoMerge pull request #2303 from topecongiro/issue-2296
Nick Cameron [Fri, 22 Dec 2017 04:46:10 +0000 (17:46 +1300)]
Merge pull request #2303 from topecongiro/issue-2296

Fix indent width bug when recovering comments

6 years ago0.3.3
Nick Cameron [Fri, 22 Dec 2017 03:06:23 +0000 (16:06 +1300)]
0.3.3

6 years agoFix indent width bug when recovering comments
topecongiro [Fri, 22 Dec 2017 03:00:24 +0000 (12:00 +0900)]
Fix indent width bug when recovering comments

Using last_line_width() ignores the width of tab character ('\t').

6 years agoMerge pull request #2288 from davidalber/fix-2078
Nick Cameron [Fri, 22 Dec 2017 02:44:19 +0000 (15:44 +1300)]
Merge pull request #2288 from davidalber/fix-2078

Reporting test parse errors as test failures

6 years agofix tests
Nick Cameron [Fri, 22 Dec 2017 02:30:45 +0000 (15:30 +1300)]
fix tests

6 years agoMerge pull request #2302 from bkchr/rust_nightly_21_22_2017
Nick Cameron [Fri, 22 Dec 2017 02:24:57 +0000 (15:24 +1300)]
Merge pull request #2302 from bkchr/rust_nightly_21_22_2017

Fixes compilation with rust version 2017-12-21

6 years agoFixes compilation with rust version 2017-12-21
Bastian Köcher [Fri, 22 Dec 2017 01:52:22 +0000 (02:52 +0100)]
Fixes compilation with rust version 2017-12-21

6 years agoMerge pull request #2291 from topecongiro/issue-2289
Nick Cameron [Thu, 21 Dec 2017 23:58:02 +0000 (12:58 +1300)]
Merge pull request #2291 from topecongiro/issue-2289

Take the width of block's prefix into account only once

6 years agoMerge pull request #2295 from topecongiro/issue-2280
Nick Cameron [Thu, 21 Dec 2017 23:56:53 +0000 (12:56 +1300)]
Merge pull request #2295 from topecongiro/issue-2280

Make 'cargo fmt' formats every workspace member

6 years agofix libsyntax fallout
Nick Cameron [Thu, 21 Dec 2017 22:12:11 +0000 (11:12 +1300)]
fix libsyntax fallout

6 years agoMerge pull request #2297 from topecongiro/type-alias-wrong-indent
Nick Cameron [Thu, 21 Dec 2017 22:05:02 +0000 (11:05 +1300)]
Merge pull request #2297 from topecongiro/type-alias-wrong-indent

Fix wrong indentation on type alias

6 years agoUsing common execute rustfmt function
David Alber [Thu, 21 Dec 2017 07:15:14 +0000 (23:15 -0800)]
Using common execute rustfmt function

6 years agoReusing status-handling function
David Alber [Thu, 21 Dec 2017 06:36:36 +0000 (22:36 -0800)]
Reusing status-handling function

6 years agoFactoring out status code values
David Alber [Thu, 21 Dec 2017 05:53:33 +0000 (21:53 -0800)]
Factoring out status code values

6 years agoAdding --version option to cargo-fmt
David Alber [Thu, 21 Dec 2017 05:48:59 +0000 (21:48 -0800)]
Adding --version option to cargo-fmt

6 years agoFix wrong indentation on type alias
topecongiro [Thu, 21 Dec 2017 00:58:13 +0000 (09:58 +0900)]
Fix wrong indentation on type alias

Use rewrite_assign_rhs() when rewriting type alias.

6 years agoMake 'cargo fmt' formats every workspace member
Seiichi Uchida [Wed, 20 Dec 2017 13:46:24 +0000 (22:46 +0900)]
Make 'cargo fmt' formats every workspace member

6 years agoTake the width of block's prefix into account only once
topecongiro [Tue, 19 Dec 2017 00:41:05 +0000 (09:41 +0900)]
Take the width of block's prefix into account only once

6 years agoUsing `if let` to be more concise
David Alber [Mon, 18 Dec 2017 09:02:48 +0000 (01:02 -0800)]
Using `if let` to be more concise

6 years agoReporting test parse errors as test failures
David Alber [Mon, 18 Dec 2017 00:50:09 +0000 (16:50 -0800)]
Reporting test parse errors as test failures

Fixes 2078.

6 years agoMerge pull request #2286 from topecongiro/issue-2123
Nick Cameron [Sun, 17 Dec 2017 06:42:19 +0000 (19:42 +1300)]
Merge pull request #2286 from topecongiro/issue-2123

Respect leading whitespace when wrapping comment

6 years agoDo not put comment's line start and closer on the same line
Seiichi Uchida [Sun, 17 Dec 2017 06:25:24 +0000 (15:25 +0900)]
Do not put comment's line start and closer on the same line

6 years agoRespect leading whitespace in original comment when wrapping comment
Seiichi Uchida [Sun, 17 Dec 2017 06:24:49 +0000 (15:24 +0900)]
Respect leading whitespace in original comment when wrapping comment

6 years agoAdd a test for #2123 and update tests
Seiichi Uchida [Sun, 17 Dec 2017 06:23:17 +0000 (15:23 +0900)]
Add a test for #2123 and update tests

6 years agoMerge pull request #2228 from CAD97/patch-1
Nick Cameron [Sun, 17 Dec 2017 06:14:20 +0000 (19:14 +1300)]
Merge pull request #2228 from CAD97/patch-1

Add configuration stability information

6 years agoRemove reference to env var
Christopher Durham [Wed, 6 Dec 2017 23:13:31 +0000 (18:13 -0500)]
Remove reference to env var

The check was moved to compile time and was not intended to be user-facing

6 years agoMention un/stable configuration in README
Christopher Durham [Mon, 4 Dec 2017 07:10:36 +0000 (02:10 -0500)]
Mention un/stable configuration in README

6 years agoRemove `chain_indent`
Christopher Durham [Mon, 4 Dec 2017 07:00:09 +0000 (02:00 -0500)]
Remove `chain_indent`

6 years agoAdd configuration stability information
Christopher Durham [Sun, 3 Dec 2017 01:52:48 +0000 (20:52 -0500)]
Add configuration stability information

6 years agoFix CI instructions in README.md
Nick Cameron [Fri, 15 Dec 2017 10:59:06 +0000 (23:59 +1300)]
Fix CI instructions in README.md

Closes #2285

6 years agoMerge pull request #2284 from topecongiro/trait-aliases
Nick Cameron [Fri, 15 Dec 2017 05:11:28 +0000 (18:11 +1300)]
Merge pull request #2284 from topecongiro/trait-aliases

Format trait aliases

6 years agoFormat trait aliases
topecongiro [Fri, 15 Dec 2017 04:47:52 +0000 (13:47 +0900)]
Format trait aliases

6 years agoAdd tests for trait aliases
topecongiro [Fri, 15 Dec 2017 04:47:32 +0000 (13:47 +0900)]
Add tests for trait aliases

6 years ago0.3.2
topecongiro [Fri, 15 Dec 2017 01:39:33 +0000 (10:39 +0900)]
0.3.2

6 years agoAdd an initial support for trait aliases
topecongiro [Fri, 15 Dec 2017 01:35:07 +0000 (10:35 +0900)]
Add an initial support for trait aliases

6 years agoMove from String to PathBuf where applicable
Oliver Schneider [Fri, 8 Dec 2017 13:16:47 +0000 (14:16 +0100)]
Move from String to PathBuf where applicable

6 years agoMerge pull request #2271 from topecongiro/refactorings
Nick Cameron [Thu, 14 Dec 2017 19:53:48 +0000 (08:53 +1300)]
Merge pull request #2271 from topecongiro/refactorings

Refactorings from cargo clippy etc.

6 years agoMerge pull request #2276 from topecongiro/changelog
Nick Cameron [Wed, 13 Dec 2017 07:54:56 +0000 (20:54 +1300)]
Merge pull request #2276 from topecongiro/changelog

Update CHANGELOG

6 years agoUpdate CHANGELOG
Seiichi Uchida [Tue, 12 Dec 2017 04:39:43 +0000 (13:39 +0900)]
Update CHANGELOG

1. Update CHANGELOG from 0.2.17 to 0.3.1.
2. Add Unreleased section to ease the management of CHANGELOG.

6 years agoDo not print to stderr when parsing the toml file succeeded
Seiichi Uchida [Tue, 12 Dec 2017 05:10:31 +0000 (14:10 +0900)]
Do not print to stderr when parsing the toml file succeeded

6 years agoRefactor write_snippet_inner()
Seiichi Uchida [Tue, 12 Dec 2017 04:48:24 +0000 (13:48 +0900)]
Refactor write_snippet_inner()

6 years agoCargo clippy
Seiichi Uchida [Tue, 12 Dec 2017 04:48:12 +0000 (13:48 +0900)]
Cargo clippy

6 years agoMerge pull request #2274 from topecongiro/better-error-msg
Nick Cameron [Tue, 12 Dec 2017 03:55:55 +0000 (16:55 +1300)]
Merge pull request #2274 from topecongiro/better-error-msg

Attempt to improve error meassage from rustfmt

6 years agoWarn when there are unknown config options
topecongiro [Mon, 11 Dec 2017 15:54:55 +0000 (00:54 +0900)]
Warn when there are unknown config options

6 years agoDo not print usage when rustfmt failed
topecongiro [Mon, 11 Dec 2017 15:54:37 +0000 (00:54 +0900)]
Do not print usage when rustfmt failed

6 years ago0.3.1
Seiichi Uchida [Mon, 11 Dec 2017 13:09:48 +0000 (22:09 +0900)]
0.3.1

6 years agoMerge pull request #2173 from topecongiro/assignment-with-100-chars
Nick Cameron [Mon, 11 Dec 2017 04:04:41 +0000 (17:04 +1300)]
Merge pull request #2173 from topecongiro/assignment-with-100-chars

Assignment whose lhs has 100 chars

6 years agoMerge pull request #2257 from topecongiro/error-on-line-overflow-strings
Nick Cameron [Mon, 11 Dec 2017 03:41:15 +0000 (16:41 +1300)]
Merge pull request #2257 from topecongiro/error-on-line-overflow-strings

Add error_on_line_overflow_strings config option

6 years agoMerge pull request #2270 from topecongiro/issue-2260
Nick Cameron [Mon, 11 Dec 2017 03:40:12 +0000 (16:40 +1300)]
Merge pull request #2270 from topecongiro/issue-2260

Trim a trailing whitespace on empty line inside code block comment

6 years agoUse enumerate()
Seiichi Uchida [Mon, 11 Dec 2017 02:50:11 +0000 (11:50 +0900)]
Use enumerate()

6 years agoRename error_on_unformatted_comments_or_strings to error_on_unformatted
Seiichi Uchida [Mon, 11 Dec 2017 02:46:04 +0000 (11:46 +0900)]
Rename error_on_unformatted_comments_or_strings to error_on_unformatted

6 years agoSet error_on_unformatted_comments_or_strings to true when --error-on-unformatted
Seiichi Uchida [Mon, 11 Dec 2017 01:15:31 +0000 (10:15 +0900)]
Set error_on_unformatted_comments_or_strings to true when --error-on-unformatted
option is passed

6 years agoPrint command line options in alphabetical order
Seiichi Uchida [Mon, 11 Dec 2017 01:01:00 +0000 (10:01 +0900)]
Print command line options in alphabetical order

6 years agoFix a typo
Seiichi Uchida [Mon, 11 Dec 2017 01:00:49 +0000 (10:00 +0900)]
Fix a typo

6 years agoOrganize command line options and start with upper case
Seiichi Uchida [Mon, 11 Dec 2017 00:55:15 +0000 (09:55 +0900)]
Organize command line options and start with upper case

6 years agoAdd error-on-unformatted command line option
Seiichi Uchida [Mon, 11 Dec 2017 00:54:44 +0000 (09:54 +0900)]
Add error-on-unformatted command line option

6 years agoCombine error_on_line_overflow_comments/strings
Seiichi Uchida [Mon, 11 Dec 2017 00:39:06 +0000 (09:39 +0900)]
Combine error_on_line_overflow_comments/strings

1. Rename to error_on_unformatted_comments_or_strings
2. Set the option to false by default.

6 years agoFix a typo
Seiichi Uchida [Sun, 10 Dec 2017 09:14:17 +0000 (18:14 +0900)]
Fix a typo

6 years agoMake RichChar public
Seiichi Uchida [Sat, 9 Dec 2017 14:37:42 +0000 (23:37 +0900)]
Make RichChar public

6 years agoAdd a config option to suppress error message on string literal
Seiichi Uchida [Sat, 9 Dec 2017 11:24:14 +0000 (20:24 +0900)]
Add a config option to suppress error message on string literal

6 years agoMake CharClasses and FullCodeCharKind public
Seiichi Uchida [Sat, 9 Dec 2017 11:23:48 +0000 (20:23 +0900)]
Make CharClasses and FullCodeCharKind public

6 years agoAdd a test for error_on_line_overflow_strings
Seiichi Uchida [Sat, 9 Dec 2017 11:21:34 +0000 (20:21 +0900)]
Add a test for error_on_line_overflow_strings

6 years agoAdd a test fot #2260
Seiichi Uchida [Mon, 11 Dec 2017 02:40:59 +0000 (11:40 +0900)]
Add a test fot #2260

6 years agoMerge pull request #2261 from topecongiro/replace-string-buffer
Nick Cameron [Mon, 11 Dec 2017 02:39:55 +0000 (15:39 +1300)]
Merge pull request #2261 from topecongiro/replace-string-buffer

Replace `StringBuffer` with `String`

6 years agoTrim a trailing whitespace on empty line inside code block comment
Seiichi Uchida [Mon, 11 Dec 2017 02:37:13 +0000 (11:37 +0900)]
Trim a trailing whitespace on empty line inside code block comment

6 years agoFix indent issue when recovering comments
Seiichi Uchida [Sun, 10 Dec 2017 08:41:02 +0000 (17:41 +0900)]
Fix indent issue when recovering comments

Closes #1989

6 years agoReplace StringBuffer with String
Seiichi Uchida [Sun, 10 Dec 2017 08:40:51 +0000 (17:40 +0900)]
Replace StringBuffer with String

6 years ago0.3.0
Nick Cameron [Sun, 10 Dec 2017 20:35:30 +0000 (09:35 +1300)]
0.3.0

6 years agoMerge pull request #2267 from topecongiro/issue-2264
Nick Cameron [Sun, 10 Dec 2017 20:02:16 +0000 (09:02 +1300)]
Merge pull request #2267 from topecongiro/issue-2264

Remove block() and block_only() wherever possible

6 years agoMerge pull request #2265 from topecongiro/issue-2262
Nick Cameron [Sun, 10 Dec 2017 20:00:56 +0000 (09:00 +1300)]
Merge pull request #2265 from topecongiro/issue-2262

Fix bugs related to closures

6 years agoMerge pull request #2258 from topecongiro/issue-819
Nick Cameron [Sun, 10 Dec 2017 19:54:02 +0000 (08:54 +1300)]
Merge pull request #2258 from topecongiro/issue-819

Format macro in pattern position

6 years agoMerge pull request #2255 from topecongiro/nested-imports
Nick Cameron [Sun, 10 Dec 2017 19:53:23 +0000 (08:53 +1300)]
Merge pull request #2255 from topecongiro/nested-imports

Nested imports

6 years agoMerge pull request #2250 from topecongiro/rustfmt-skip-no-warning-on-items
Nick Cameron [Sun, 10 Dec 2017 19:47:26 +0000 (08:47 +1300)]
Merge pull request #2250 from topecongiro/rustfmt-skip-no-warning-on-items

Do not report errors on skipped items or statements

6 years agoMerge pull request #2249 from CAD97/patch-3
Nick Cameron [Sun, 10 Dec 2017 19:45:02 +0000 (08:45 +1300)]
Merge pull request #2249 from CAD97/patch-3

unstable_features without CFG_RELEASE_CHANNEL

6 years agoFix indentation in multi lined pattern
Seiichi Uchida [Sun, 10 Dec 2017 14:54:34 +0000 (23:54 +0900)]
Fix indentation in multi lined pattern

6 years agoRemove excessive block() and block_only()
Seiichi Uchida [Sun, 10 Dec 2017 14:39:09 +0000 (23:39 +0900)]
Remove excessive block() and block_only()

Since we now use the same indent style for every expressions, these safe guards
can be removed.

6 years agoAdd a test fot #2264
Seiichi Uchida [Sun, 10 Dec 2017 14:38:30 +0000 (23:38 +0900)]
Add a test fot #2264

6 years agoCargo fmt
Seiichi Uchida [Sun, 10 Dec 2017 12:54:26 +0000 (21:54 +0900)]
Cargo fmt

6 years agoDo not set inside_macro flag when converting try!() to '?'
Seiichi Uchida [Sun, 10 Dec 2017 12:53:01 +0000 (21:53 +0900)]
Do not set inside_macro flag when converting try!() to '?'

This will keep rustfmt idempotent when using 'use_try_shorthand' config option.

6 years agoAllow struct to be multi-lined in closure's body without block
Seiichi Uchida [Sun, 10 Dec 2017 12:52:23 +0000 (21:52 +0900)]
Allow struct to be multi-lined in closure's body without block

6 years agoMove macro check to is_block_closure_forced()
Seiichi Uchida [Sun, 10 Dec 2017 12:49:59 +0000 (21:49 +0900)]
Move macro check to is_block_closure_forced()

6 years agoRemove and_one_line()
Seiichi Uchida [Sun, 10 Dec 2017 12:30:12 +0000 (21:30 +0900)]
Remove and_one_line()

6 years agoVerify whether adding block is safe in rewrite_closure_with_block()
Seiichi Uchida [Sun, 10 Dec 2017 12:27:28 +0000 (21:27 +0900)]
Verify whether adding block is safe in rewrite_closure_with_block()

Also ensure that the expression is nested to avoid false-positive.

6 years agoAdd a test for #2262
Seiichi Uchida [Sun, 10 Dec 2017 12:19:51 +0000 (21:19 +0900)]
Add a test for #2262

6 years agounstable_features without CFG_RELEASE_CHANNEL
Christopher Durham [Wed, 6 Dec 2017 23:07:19 +0000 (18:07 -0500)]
unstable_features without CFG_RELEASE_CHANNEL

Per discussion in #2228

https://github.com/rust-lang-nursery/rustfmt/pull/2228#issuecomment-348893294
https://github.com/rust-lang-nursery/rustfmt/pull/2228#issuecomment-349799548

Inline comment should explain the reasoning.

6 years agoFormat macro in pattern position
Seiichi Uchida [Sat, 9 Dec 2017 15:22:00 +0000 (00:22 +0900)]
Format macro in pattern position

6 years agoAdd tests for macro in pattern position
Seiichi Uchida [Sat, 9 Dec 2017 15:21:49 +0000 (00:21 +0900)]
Add tests for macro in pattern position

6 years agoHandle nested imports
Seiichi Uchida [Sat, 9 Dec 2017 07:43:22 +0000 (16:43 +0900)]
Handle nested imports

6 years agoAdd tests for nested imports
Seiichi Uchida [Sat, 9 Dec 2017 07:43:06 +0000 (16:43 +0900)]
Add tests for nested imports

6 years agoRemove println! debug :(
topecongiro [Fri, 8 Dec 2017 08:48:49 +0000 (17:48 +0900)]
Remove println! debug :(

6 years agoDo not report errors on skipped items or statements
topecongiro [Fri, 8 Dec 2017 08:46:43 +0000 (17:46 +0900)]
Do not report errors on skipped items or statements

6 years agoKeep track of line number in visitor
topecongiro [Fri, 8 Dec 2017 07:59:04 +0000 (16:59 +0900)]
Keep track of line number in visitor

6 years agoMerge pull request #2247 from topecongiro/optimize-snippet
Nick Cameron [Fri, 8 Dec 2017 07:39:01 +0000 (20:39 +1300)]
Merge pull request #2247 from topecongiro/optimize-snippet

Optimize snippet()

6 years agoMerge pull request #2229 from CAD97/patch-2
Nick Cameron [Fri, 8 Dec 2017 04:28:01 +0000 (17:28 +1300)]
Merge pull request #2229 from CAD97/patch-2

[Travis] Fix python/travis-cargo on macOS

6 years agoReplace into() on &str with to_owned()
Seiichi Uchida [Fri, 8 Dec 2017 04:07:42 +0000 (13:07 +0900)]
Replace into() on &str with to_owned()

6 years agoRemove unused lifetime
Seiichi Uchida [Fri, 8 Dec 2017 04:07:28 +0000 (13:07 +0900)]
Remove unused lifetime

6 years agoMerge pull request #2240 from davidalber/revisit-2219
Seiichi Uchida [Thu, 7 Dec 2017 08:37:01 +0000 (17:37 +0900)]
Merge pull request #2240 from davidalber/revisit-2219

Adding `print!` to the list of specially-formatted `format!`-like macros

6 years agoReplace &Rc<String> with &str
Seiichi Uchida [Thu, 7 Dec 2017 08:32:19 +0000 (17:32 +0900)]
Replace &Rc<String> with &str