]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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

6 years agoAdding tests for `assert!`, `write!`, and `writeln!`
David Alber [Thu, 7 Dec 2017 06:42:33 +0000 (22:42 -0800)]
Adding tests for `assert!`, `write!`, and `writeln!`

6 years agoMoving `panic!` into the list of macros from the Standard Library
David Alber [Thu, 7 Dec 2017 06:23:02 +0000 (22:23 -0800)]
Moving `panic!` into the list of macros from the Standard Library

6 years agoAdd FmtVisitor::from_context()
Seiichi Uchida [Thu, 7 Dec 2017 04:53:10 +0000 (13:53 +0900)]
Add FmtVisitor::from_context()

6 years agoUse explicit lifetime to get rid of unsafe code
Seiichi Uchida [Thu, 7 Dec 2017 04:51:30 +0000 (13:51 +0900)]
Use explicit lifetime to get rid of unsafe code

at least this is why we use Rust

6 years agoConvert '&str' into 'String' whenever necessary
Seiichi Uchida [Wed, 6 Dec 2017 13:52:43 +0000 (22:52 +0900)]
Convert '&str' into 'String' whenever necessary

6 years agoRemove excess trailing &&
Christopher Durham [Wed, 6 Dec 2017 22:47:48 +0000 (17:47 -0500)]
Remove excess trailing &&

6 years agoMerge pull request #2248 from alexheretic/master
Nick Cameron [Wed, 6 Dec 2017 19:47:58 +0000 (08:47 +1300)]
Merge pull request #2248 from alexheretic/master

Fix config warnings leaking into stdout

6 years agoFix config warnings leaking into stdout
Alex Butler [Wed, 6 Dec 2017 16:22:09 +0000 (16:22 +0000)]
Fix config warnings leaking into stdout

6 years agoUpdate FmtVisitor::from_codemap()
Seiichi Uchida [Wed, 6 Dec 2017 13:51:52 +0000 (22:51 +0900)]
Update FmtVisitor::from_codemap()

6 years agoUse SnippetProvider in FmtVisitor and RewriteContext
Seiichi Uchida [Wed, 6 Dec 2017 13:49:49 +0000 (22:49 +0900)]
Use SnippetProvider in FmtVisitor and RewriteContext

6 years agoAdd SnippetProvider
Seiichi Uchida [Wed, 6 Dec 2017 13:48:48 +0000 (22:48 +0900)]
Add SnippetProvider

6 years agoMerge pull request #2246 from divarvel/patch-1
Seiichi Uchida [Wed, 6 Dec 2017 12:38:22 +0000 (21:38 +0900)]
Merge pull request #2246 from divarvel/patch-1

Fix format for `spaces_around_ranges` example

6 years agoFix format for `spaces_around_ranges` example
Clément Delafargue [Wed, 6 Dec 2017 10:19:23 +0000 (11:19 +0100)]
Fix format for `spaces_around_ranges` example

6 years agoChain commands by &&
Christopher Durham [Wed, 6 Dec 2017 09:12:34 +0000 (04:12 -0500)]
Chain commands by &&

See https://github.com/rust-lang-nursery/rustfmt/pull/2229/files#r155177741 for reasoning

6 years agoMerge pull request #2243 from topecongiro/issue-2241
Nick Cameron [Wed, 6 Dec 2017 04:36:59 +0000 (17:36 +1300)]
Merge pull request #2243 from topecongiro/issue-2241

Use package name instead of target name for --package filter

6 years agoUse package name instead of target name for --package filter
Seiichi Uchida [Wed, 6 Dec 2017 03:41:04 +0000 (12:41 +0900)]
Use package name instead of target name for --package filter

6 years agoMerge pull request #2221 from topecongiro/rfc/blank-lines
Nick Cameron [Wed, 6 Dec 2017 02:52:19 +0000 (15:52 +1300)]
Merge pull request #2221 from topecongiro/rfc/blank-lines

Keep vertical spaces between items or statements within range

6 years agoOnly export path for linux
Christopher Durham [Wed, 6 Dec 2017 02:42:00 +0000 (21:42 -0500)]
Only export path for linux

as per [@davidalber's advice](https://github.com/rust-lang-nursery/rustfmt/pull/2229#discussion_r155129274)

6 years agoAdding `print!` specially-formatted `format!`-like macros list
David Alber [Wed, 6 Dec 2017 00:49:48 +0000 (16:49 -0800)]
Adding `print!` specially-formatted `format!`-like macros list

This commit corrects what appears to be an accidental inclusion of
`panic!` twice in the list resulting from the union of ffbe52e and
aeb3398.

6 years agoAdding tests for all specially-formatted `format!`-like macros
David Alber [Wed, 6 Dec 2017 00:45:01 +0000 (16:45 -0800)]
Adding tests for all specially-formatted `format!`-like macros

6 years agoAdd more tests
Seiichi Uchida [Tue, 5 Dec 2017 08:45:19 +0000 (17:45 +0900)]
Add more tests

6 years agoHandle cases when bound changed from the default
Seiichi Uchida [Tue, 5 Dec 2017 08:38:27 +0000 (17:38 +0900)]
Handle cases when bound changed from the default

6 years agoAdd a test for 'blank_lines_lower_bound = 1'
Seiichi Uchida [Tue, 5 Dec 2017 08:38:07 +0000 (17:38 +0900)]
Add a test for 'blank_lines_lower_bound = 1'

6 years agoUpdate tests
Seiichi Uchida [Tue, 5 Dec 2017 08:16:04 +0000 (17:16 +0900)]
Update tests

6 years agoCargo fmt
Seiichi Uchida [Tue, 5 Dec 2017 08:15:58 +0000 (17:15 +0900)]
Cargo fmt

6 years agoTake into account a trailing newline in buffer
Seiichi Uchida [Tue, 5 Dec 2017 08:15:42 +0000 (17:15 +0900)]
Take into account a trailing newline in buffer

6 years agoProcess blank lines if only they're within file lines range
Seiichi Uchida [Tue, 5 Dec 2017 08:14:30 +0000 (17:14 +0900)]
Process blank lines if only they're within file lines range

6 years agoKeep blank lines around comments with range
Seiichi Uchida [Tue, 5 Dec 2017 07:39:45 +0000 (16:39 +0900)]
Keep blank lines around comments with range

6 years agoFactor out process_comment()
Seiichi Uchida [Tue, 5 Dec 2017 07:25:33 +0000 (16:25 +0900)]
Factor out process_comment()

6 years agoChange the type of argument of push_vertical_spaces()
Seiichi Uchida [Tue, 5 Dec 2017 06:19:36 +0000 (15:19 +0900)]
Change the type of argument of push_vertical_spaces()

6 years agoAdd count_newlines() utility function
Seiichi Uchida [Tue, 5 Dec 2017 06:17:40 +0000 (15:17 +0900)]
Add count_newlines() utility function

6 years agoMerge pull request #2239 from topecongiro/issue-2157
Nick Cameron [Tue, 5 Dec 2017 03:56:52 +0000 (16:56 +1300)]
Merge pull request #2239 from topecongiro/issue-2157

Fix double indented chained closure

6 years agoMerge pull request #2238 from topecongiro/issue-1209
Nick Cameron [Tue, 5 Dec 2017 03:55:31 +0000 (16:55 +1300)]
Merge pull request #2238 from topecongiro/issue-1209

Format a macro in the type position

6 years agoMerge pull request #2237 from topecongiro/issue-2131
Nick Cameron [Tue, 5 Dec 2017 03:53:00 +0000 (16:53 +1300)]
Merge pull request #2237 from topecongiro/issue-2131

Do not pass files as arguments to rustfmt when dumping the default config

6 years agoFix indent of chain with small parent
Seiichi Uchida [Tue, 5 Dec 2017 01:03:23 +0000 (10:03 +0900)]
Fix indent of chain with small parent

6 years agoAdd a test for #2157
Seiichi Uchida [Tue, 5 Dec 2017 01:02:49 +0000 (10:02 +0900)]
Add a test for #2157

6 years agoUpdate a test
Seiichi Uchida [Mon, 4 Dec 2017 23:44:26 +0000 (08:44 +0900)]
Update a test

6 years agoForamt macro on types
Seiichi Uchida [Mon, 4 Dec 2017 23:41:20 +0000 (08:41 +0900)]
Foramt macro on types

6 years agoAdd a test for #1209
Seiichi Uchida [Mon, 4 Dec 2017 23:41:10 +0000 (08:41 +0900)]
Add a test for #1209

6 years agoDo not pass files as arguments to rustfmt when dumping the default config
Seiichi Uchida [Mon, 4 Dec 2017 23:01:29 +0000 (08:01 +0900)]
Do not pass files as arguments to rustfmt when dumping the default config

6 years agoFix macOS build
Christopher Durham [Sun, 3 Dec 2017 02:26:09 +0000 (21:26 -0500)]
Fix macOS build

- Ensure python is available https://github.com/travis-ci/travis-ci/issues/2312
- Only pip install --user on linux, macOS is in virtualenv
- Set PATH in a os-agnostic manner https://github.com/huonw/travis-cargo/pull/71

6 years agoMerge pull request #2236 from topecongiro/simple-array
Nick Cameron [Mon, 4 Dec 2017 04:33:42 +0000 (17:33 +1300)]
Merge pull request #2236 from topecongiro/simple-array

Compress an array whose items are all 'simple'

6 years agoMerge pull request #2235 from topecongiro/option_env
Nick Cameron [Mon, 4 Dec 2017 04:24:39 +0000 (17:24 +1300)]
Merge pull request #2235 from topecongiro/option_env

Inspect CFG_RELEASE_CHANNEL env var at compile time

6 years agoCompress an array with simple items
topecongiro [Mon, 4 Dec 2017 03:07:06 +0000 (12:07 +0900)]
Compress an array with simple items

6 years agoFactor out array_tactic
topecongiro [Mon, 4 Dec 2017 03:06:46 +0000 (12:06 +0900)]
Factor out array_tactic

6 years agoUpdate tests
topecongiro [Mon, 4 Dec 2017 03:05:16 +0000 (12:05 +0900)]
Update tests

6 years agoInspect CFG_RELEASE_CHANNEL env var at compile time
topecongiro [Mon, 4 Dec 2017 02:34:27 +0000 (11:34 +0900)]
Inspect CFG_RELEASE_CHANNEL env var at compile time

6 years agoMerge pull request #2219 from topecongiro/issue-549
Nick Cameron [Sun, 3 Dec 2017 21:00:07 +0000 (10:00 +1300)]
Merge pull request #2219 from topecongiro/issue-549

Handle special-case format! like macros

6 years agoCargo fmt
Seiichi Uchida [Sun, 3 Dec 2017 02:38:16 +0000 (11:38 +0900)]
Cargo fmt

6 years agoAdd macros from the log crate to whitelist
Seiichi Uchida [Sun, 3 Dec 2017 02:37:55 +0000 (11:37 +0900)]
Add macros from the log crate to whitelist

6 years agoCargo fmt
topecongiro [Fri, 1 Dec 2017 10:47:56 +0000 (19:47 +0900)]
Cargo fmt

6 years agoFactor out a mess
topecongiro [Fri, 1 Dec 2017 04:44:40 +0000 (13:44 +0900)]
Factor out a mess

6 years agoCargo fmt and update a test
topecongiro [Fri, 1 Dec 2017 04:30:21 +0000 (13:30 +0900)]
Cargo fmt and update a test

6 years agoHandle special-case macros
topecongiro [Fri, 1 Dec 2017 04:30:04 +0000 (13:30 +0900)]
Handle special-case macros

6 years agoAdd whitelists of macros that need special-case format
topecongiro [Fri, 1 Dec 2017 04:28:36 +0000 (13:28 +0900)]
Add whitelists of macros that need special-case format

6 years agoAdd a test for special case macros like format! and assert!
topecongiro [Fri, 1 Dec 2017 04:28:16 +0000 (13:28 +0900)]
Add a test for special case macros like format! and assert!

6 years agoMerge pull request #2222 from topecongiro/issue-2197
Nick Cameron [Sun, 3 Dec 2017 02:00:27 +0000 (15:00 +1300)]
Merge pull request #2222 from topecongiro/issue-2197

Do not format fenced code blocks in comment