]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoInitial implementation of hard tab indentation.
Pavel Sountsov [Sun, 6 Sep 2015 05:39:28 +0000 (22:39 -0700)]
Initial implementation of hard tab indentation.

8 years agoMerge pull request #332 from Kha/variant_no_vis
Marcus Klaas de Vries [Sat, 19 Sep 2015 17:19:34 +0000 (19:19 +0200)]
Merge pull request #332 from Kha/variant_no_vis

rustc update: Remove variant visibility

8 years agorustc update: Remove variant visibility
Sebastian Ullrich [Sat, 19 Sep 2015 15:28:00 +0000 (17:28 +0200)]
rustc update: Remove variant visibility

https://github.com/rust-lang/rust/pull/28440

8 years agoMerge pull request #326 from marcusklaas/interface-refactor
Marcus Klaas de Vries [Fri, 18 Sep 2015 20:37:09 +0000 (22:37 +0200)]
Merge pull request #326 from marcusklaas/interface-refactor

Refactor rustfmt's interface and test code

8 years agoRefactor test code
Marcus Klaas [Thu, 17 Sep 2015 18:21:06 +0000 (20:21 +0200)]
Refactor test code

No longer use callbacks or thread::catch_panic; reduce stdout spew; guard against rustfmt breaking the column limit.

8 years agoSplit formatting function from side effects
Marcus Klaas [Wed, 16 Sep 2015 19:52:32 +0000 (21:52 +0200)]
Split formatting function from side effects

This makes rustfmt more usable as a library.

8 years agoMerge pull request #314 from alobb/configDocumentation
cassiersg [Thu, 17 Sep 2015 21:13:25 +0000 (23:13 +0200)]
Merge pull request #314 from alobb/configDocumentation

Fixed https://github.com/nrc/rustfmt/issues/291

8 years agoMerge pull request #330 from marcusklaas/fn-no-return
cassiersg [Thu, 17 Sep 2015 21:09:09 +0000 (23:09 +0200)]
Merge pull request #330 from marcusklaas/fn-no-return

Add regression test for non-returning functions

8 years agoAdd regression test for non-returning functions
Marcus Klaas [Thu, 17 Sep 2015 19:35:03 +0000 (21:35 +0200)]
Add regression test for non-returning functions

8 years agoMerge pull request #324 from marcusklaas/macro-uses
Nick Cameron [Wed, 16 Sep 2015 22:46:19 +0000 (10:46 +1200)]
Merge pull request #324 from marcusklaas/macro-uses

Format macro invocations

8 years agoFormat macro invocations
Marcus Klaas [Mon, 14 Sep 2015 20:53:30 +0000 (22:53 +0200)]
Format macro invocations

8 years agoMerge pull request #323 from nrc/unsafe-closure
Marcus Klaas de Vries [Wed, 16 Sep 2015 18:02:30 +0000 (20:02 +0200)]
Merge pull request #323 from nrc/unsafe-closure

Preserve unsafe blocks in closures

8 years agoAdded help string for chains_overflow_last config parameter
Aaron Lobb [Wed, 16 Sep 2015 04:15:46 +0000 (21:15 -0700)]
Added help string for chains_overflow_last config parameter

8 years agoPreserve unsafe blocks in closures
Nick Cameron [Tue, 15 Sep 2015 05:45:54 +0000 (17:45 +1200)]
Preserve unsafe blocks in closures

Fixes #321

8 years agoMerge pull request #318 from nrc/shr_test
Nick Cameron [Mon, 14 Sep 2015 23:49:35 +0000 (11:49 +1200)]
Merge pull request #318 from nrc/shr_test

Some random tidying up

8 years agoRemove a few unnecessary `rustfmt_skip`s
Nick Cameron [Mon, 14 Sep 2015 23:42:54 +0000 (11:42 +1200)]
Remove a few unnecessary `rustfmt_skip`s

8 years agoAdd a test for dodgy spans around `>>`
Nick Cameron [Mon, 14 Sep 2015 23:40:04 +0000 (11:40 +1200)]
Add a test for dodgy spans around `>>`

Closes #242

8 years agoChanged ConfigType trait to only return a string of variants, rather than a vec
Aaron Lobb [Mon, 14 Sep 2015 20:43:55 +0000 (13:43 -0700)]
Changed ConfigType trait to only return a string of variants, rather than a vec

8 years agoMerged config imports
Aaron Lobb [Mon, 14 Sep 2015 20:06:09 +0000 (13:06 -0700)]
Merged config imports

8 years agoMerge pull request #316 from marcusklaas/diff-upgrade
Nick Cameron [Mon, 14 Sep 2015 18:32:01 +0000 (06:32 +1200)]
Merge pull request #316 from marcusklaas/diff-upgrade

Bump diff.rs version

8 years agoBump diff.rs version
Marcus Klaas [Mon, 14 Sep 2015 18:17:51 +0000 (20:17 +0200)]
Bump diff.rs version

This should make the computation of diffs quite a bit faster, which is particularly noticable in tests.

8 years agoMerge pull request #315 from alobb/defaultTomlRemoval
cassiersg [Mon, 14 Sep 2015 14:53:47 +0000 (16:53 +0200)]
Merge pull request #315 from alobb/defaultTomlRemoval

https://github.com/nrc/rustfmt/issues/304

8 years agohttps://github.com/nrc/rustfmt/issues/304 Removed reference to default.toml
Aaron Lobb [Mon, 14 Sep 2015 07:38:32 +0000 (00:38 -0700)]
https://github.com/nrc/rustfmt/issues/304 Removed reference to default.toml

8 years agoFixed https://github.com/nrc/rustfmt/issues/291; added output to --help runtime optio...
Aaron Lobb [Mon, 14 Sep 2015 07:29:15 +0000 (00:29 -0700)]
Fixed https://github.com/nrc/rustfmt/issues/291; added output to --help runtime option with possible config values

8 years agoMerge pull request #309 from marcusklaas/array-literals
Nick Cameron [Sat, 12 Sep 2015 21:20:37 +0000 (09:20 +1200)]
Merge pull request #309 from marcusklaas/array-literals

Format array literals

8 years agoMerge pull request #312 from marcusklaas/closure-fix
Nick Cameron [Sat, 12 Sep 2015 21:17:43 +0000 (09:17 +1200)]
Merge pull request #312 from marcusklaas/closure-fix

Prevent generation of bogus comment in some function calls

8 years agoPrevent generation of bogus comment in some function calls
Marcus Klaas [Sat, 12 Sep 2015 12:31:51 +0000 (14:31 +0200)]
Prevent generation of bogus comment in some function calls

This would happen when the callee contained parentheses.

8 years agoFormat array literals
Marcus Klaas [Fri, 11 Sep 2015 22:06:17 +0000 (00:06 +0200)]
Format array literals

8 years agoMerge pull request #307 from marcusklaas/function-arg-ty
Nick Cameron [Fri, 11 Sep 2015 22:01:53 +0000 (10:01 +1200)]
Merge pull request #307 from marcusklaas/function-arg-ty

Rewrite types in function arguments

8 years agoMerge pull request #310 from marcusklaas/continue-reg-test
Nick Cameron [Fri, 11 Sep 2015 21:52:10 +0000 (09:52 +1200)]
Merge pull request #310 from marcusklaas/continue-reg-test

Add regression test for bad continue span

8 years agoAdd regression test for bad continue span
Marcus Klaas [Fri, 11 Sep 2015 21:32:13 +0000 (23:32 +0200)]
Add regression test for bad continue span

8 years agoRewrite types in function arguments
Marcus Klaas [Fri, 11 Sep 2015 10:24:13 +0000 (12:24 +0200)]
Rewrite types in function arguments

8 years agoMerge pull request #216 from marcusklaas/format-fields
Marcus Klaas de Vries [Thu, 10 Sep 2015 22:56:14 +0000 (00:56 +0200)]
Merge pull request #216 from marcusklaas/format-fields

WIP: Format expression chains

8 years agoGeneral cleanup after rebase
Marcus Klaas [Thu, 10 Sep 2015 22:53:21 +0000 (00:53 +0200)]
General cleanup after rebase

8 years agoRefine chain breaking heuristics
Marcus Klaas [Wed, 9 Sep 2015 21:17:31 +0000 (23:17 +0200)]
Refine chain breaking heuristics

Don't make a single line chain when it is was multi line in the source; allow overflow of the last chain element onto the next lines without breaking the chain.

8 years agoRebase onto master
Marcus Klaas [Wed, 9 Sep 2015 21:15:37 +0000 (23:15 +0200)]
Rebase onto master

8 years agoAlign dots in chained expressions
Marcus Klaas [Wed, 9 Sep 2015 21:14:54 +0000 (23:14 +0200)]
Align dots in chained expressions

8 years agoEscape quotes in string literals
Marcus Klaas [Tue, 1 Sep 2015 21:51:57 +0000 (23:51 +0200)]
Escape quotes in string literals

8 years agoAdd some tests for match blocks
Marcus Klaas [Wed, 9 Sep 2015 21:14:09 +0000 (23:14 +0200)]
Add some tests for match blocks

8 years agoAdd tests for chain expressions
Marcus Klaas [Wed, 9 Sep 2015 21:13:37 +0000 (23:13 +0200)]
Add tests for chain expressions

8 years agoBreak chains that don't start with path expressions
Marcus Klaas [Thu, 10 Sep 2015 22:52:57 +0000 (00:52 +0200)]
Break chains that don't start with path expressions

8 years agoaddress mini offset bug in rewrite_match
Marcus Klaas [Wed, 9 Sep 2015 21:10:51 +0000 (23:10 +0200)]
address mini offset bug in rewrite_match

8 years agoUpdate indentation heuristics for single arg functions
Marcus Klaas [Wed, 9 Sep 2015 21:09:39 +0000 (23:09 +0200)]
Update indentation heuristics for single arg functions

8 years agoImplement basic chain formatting
Marcus Klaas [Thu, 10 Sep 2015 22:52:16 +0000 (00:52 +0200)]
Implement basic chain formatting

8 years agoMerge pull request #294 from sinhpham/diff_write_mode
Marcus Klaas de Vries [Thu, 10 Sep 2015 22:38:09 +0000 (00:38 +0200)]
Merge pull request #294 from sinhpham/diff_write_mode

Add diff write mode https://github.com/nrc/rustfmt/issues/261

8 years agoAdd diff write mode https://github.com/nrc/rustfmt/issues/261
Sinh Pham [Thu, 10 Sep 2015 22:27:22 +0000 (18:27 -0400)]
Add diff write mode https://github.com/nrc/rustfmt/issues/261

8 years agoMerge pull request #293 from sinhpham/small_style_fixes
Marcus Klaas de Vries [Wed, 9 Sep 2015 17:14:20 +0000 (19:14 +0200)]
Merge pull request #293 from sinhpham/small_style_fixes

Small style fixes.

8 years agoSmall style fixes.
Sinh Pham [Wed, 9 Sep 2015 11:56:56 +0000 (07:56 -0400)]
Small style fixes.

8 years agoMerge pull request #288 from marcusklaas/closure-return
Nick Cameron [Tue, 8 Sep 2015 21:14:15 +0000 (09:14 +1200)]
Merge pull request #288 from marcusklaas/closure-return

Format closures' return types

8 years agoFormat closures' return types
Marcus Klaas [Tue, 8 Sep 2015 18:56:33 +0000 (20:56 +0200)]
Format closures' return types

8 years agoMerge pull request #260 from cburgdorf/struct_lit_force_multiline
Nick Cameron [Tue, 8 Sep 2015 05:01:28 +0000 (17:01 +1200)]
Merge pull request #260 from cburgdorf/struct_lit_force_multiline

Implements struct_lit_force_multiline

8 years agoImplements struct_lit_force_multiline
Christoph Burgdorf [Fri, 4 Sep 2015 23:31:39 +0000 (01:31 +0200)]
Implements struct_lit_force_multiline

With struct_lit_force_multiline set to true
rustfmt won't ever mangle multiple struct properties
into one line.

Fixes #253

8 years agoMerge pull request #251 from marcusklaas/rewrite-list
Marcus Klaas de Vries [Mon, 7 Sep 2015 20:23:33 +0000 (22:23 +0200)]
Merge pull request #251 from marcusklaas/rewrite-list

Add failure mode to `write_list`

8 years agoSplit off binary search
Marcus Klaas [Mon, 7 Sep 2015 19:34:37 +0000 (21:34 +0200)]
Split off binary search

8 years agoAdd failure mode to `write_list`
Marcus Klaas [Fri, 4 Sep 2015 16:09:05 +0000 (18:09 +0200)]
Add failure mode to `write_list`

8 years agoMerge pull request #289 from sinhpham/fix_278
Nick Cameron [Mon, 7 Sep 2015 04:35:14 +0000 (16:35 +1200)]
Merge pull request #289 from sinhpham/fix_278

Fix https://github.com/nrc/rustfmt/issues/278

8 years agoFix https://github.com/nrc/rustfmt/issues/278
Sinh Pham [Mon, 7 Sep 2015 04:24:24 +0000 (00:24 -0400)]
Fix https://github.com/nrc/rustfmt/issues/278

8 years agoMerge pull request #282 from marcusklaas/qself-fix
Nick Cameron [Sun, 6 Sep 2015 21:35:29 +0000 (09:35 +1200)]
Merge pull request #282 from marcusklaas/qself-fix

Fix qself rewrites without explicit casts

8 years agoFix qself rewrites without explicit casts
Marcus Klaas [Sun, 6 Sep 2015 21:18:27 +0000 (23:18 +0200)]
Fix qself rewrites without explicit casts

8 years agoMerge pull request #265 from nrc/unsafe_one_line
Marcus Klaas de Vries [Sun, 6 Sep 2015 20:44:06 +0000 (22:44 +0200)]
Merge pull request #265 from nrc/unsafe_one_line

Single line unsafe blocks

8 years agoMerge pull request #248 from sinhpham/unicode_string_lit
Nick Cameron [Sun, 6 Sep 2015 20:01:06 +0000 (08:01 +1200)]
Merge pull request #248 from sinhpham/unicode_string_lit

Unicode string lit

8 years agoSingle line unsafe blocks
Nick Cameron [Sat, 5 Sep 2015 06:26:28 +0000 (18:26 +1200)]
Single line unsafe blocks

8 years agoMerge pull request #267 from marcusklaas/rustup4
Marcus Klaas de Vries [Sat, 5 Sep 2015 12:02:51 +0000 (14:02 +0200)]
Merge pull request #267 from marcusklaas/rustup4

Work with spanned labels in break and continue

8 years agoWork with spanned labels in break and continue
Marcus Klaas [Sat, 5 Sep 2015 12:00:16 +0000 (14:00 +0200)]
Work with spanned labels in break and continue

8 years agoMerge pull request #257 from cburgdorf/partial_config
Nick Cameron [Fri, 4 Sep 2015 22:11:50 +0000 (10:11 +1200)]
Merge pull request #257 from cburgdorf/partial_config

Allow partial rustfmt.toml

8 years agoAllow partial rustfmt.toml
Christoph Burgdorf [Fri, 4 Sep 2015 21:01:20 +0000 (23:01 +0200)]
Allow partial rustfmt.toml

With this change one can use a config file
that only specifies a subset of config keys
to overwrite. E.g. a config file that looks like this

struct_trailing_comma = "Never"
struct_lit_trailing_comma = "Never"

Fixes #255

8 years agoMerge pull request #250 from marcusklaas/regtest5
Nick Cameron [Fri, 4 Sep 2015 21:54:46 +0000 (09:54 +1200)]
Merge pull request #250 from marcusklaas/regtest5

Add regression test for trait reference formatting

8 years agoMerge pull request #252 from cburgdorf/improve_help
Nick Cameron [Fri, 4 Sep 2015 21:54:11 +0000 (09:54 +1200)]
Merge pull request #252 from cburgdorf/improve_help

fix outdated help text

8 years agoMerge pull request #258 from llogiq/master
Nick Cameron [Fri, 4 Sep 2015 21:53:31 +0000 (09:53 +1200)]
Merge pull request #258 from llogiq/master

code improvements suggested by clippy

8 years agocode improvements suggested by clippy
Andre Bogus [Fri, 4 Sep 2015 21:39:33 +0000 (23:39 +0200)]
code improvements suggested by clippy

8 years agofix outdated help text
Christoph Burgdorf [Fri, 4 Sep 2015 19:28:37 +0000 (21:28 +0200)]
fix outdated help text

8 years agoAdd regression test for trait reference formatting
Marcus Klaas [Fri, 4 Sep 2015 11:51:00 +0000 (13:51 +0200)]
Add regression test for trait reference formatting

8 years agoMerge pull request #246 from nrc/bugs2
Nick Cameron [Fri, 4 Sep 2015 05:07:34 +0000 (17:07 +1200)]
Merge pull request #246 from nrc/bugs2

Format <foo + 'bar> nicely

8 years agoFormat <foo + 'bar> nicely
Nick Cameron [Wed, 2 Sep 2015 20:57:22 +0000 (08:57 +1200)]
Format <foo + 'bar> nicely

8 years agoSupport unicode in string literals.
Sinh Pham [Fri, 4 Sep 2015 03:38:12 +0000 (23:38 -0400)]
Support unicode in string literals.

8 years agoMerge pull request #247 from marcusklaas/break-regression-test
Nick Cameron [Thu, 3 Sep 2015 22:57:28 +0000 (10:57 +1200)]
Merge pull request #247 from marcusklaas/break-regression-test

Add regression test for bad break span

8 years agoAdd regression test for bad break span
Marcus Klaas [Thu, 3 Sep 2015 18:15:24 +0000 (20:15 +0200)]
Add regression test for bad break span

8 years agoMerge pull request #245 from nrc/bugs
Marcus Klaas de Vries [Wed, 2 Sep 2015 19:49:53 +0000 (21:49 +0200)]
Merge pull request #245 from nrc/bugs

Fix a bunch of misc. bugs I found

8 years agoFix a bug where struct lits nested in fn calls were over-indented
Nick Cameron [Wed, 2 Sep 2015 03:36:17 +0000 (15:36 +1200)]
Fix a bug where struct lits nested in fn calls were over-indented

8 years agoFix a bug with alignment in one-line match arms
Nick Cameron [Wed, 2 Sep 2015 02:45:56 +0000 (14:45 +1200)]
Fix a bug with alignment in one-line match arms

8 years agoFormat match expressions properly when they appear on an overflowing line.
Nick Cameron [Wed, 2 Sep 2015 02:29:47 +0000 (14:29 +1200)]
Format match expressions properly when they appear on an overflowing line.

8 years agoPreserve some whitespace between struct fields etc.
Nick Cameron [Wed, 2 Sep 2015 02:11:19 +0000 (14:11 +1200)]
Preserve some whitespace between struct fields etc.

8 years agoMerge pull request #243 from nrc/fn-decl-2
Marcus Klaas de Vries [Tue, 1 Sep 2015 21:44:19 +0000 (23:44 +0200)]
Merge pull request #243 from nrc/fn-decl-2

More function decl variety

8 years agoSupport struct-like layouts for fn args
Nick Cameron [Tue, 1 Sep 2015 21:41:08 +0000 (09:41 +1200)]
Support struct-like layouts for fn args

8 years agoRename fn_args_layout to fn_args_density
Nick Cameron [Tue, 1 Sep 2015 20:56:37 +0000 (08:56 +1200)]
Rename fn_args_layout to fn_args_density

8 years agoMerge pull request #238 from nrc/fn-decl
Nick Cameron [Tue, 1 Sep 2015 20:00:28 +0000 (08:00 +1200)]
Merge pull request #238 from nrc/fn-decl

Customisation of function decls

8 years agoSupport where clauses on the same line as the function decl where it all fits on...
Nick Cameron [Tue, 1 Sep 2015 07:36:00 +0000 (19:36 +1200)]
Support where clauses on the same line as the function decl where it all fits on one line.

8 years agoMerge pull request #241 from marcusklaas/string-reformat
Nick Cameron [Tue, 1 Sep 2015 19:43:09 +0000 (07:43 +1200)]
Merge pull request #241 from marcusklaas/string-reformat

Remove faulty shortcut in `rewrite_string_lit`

8 years agoRemove faulty shortcut in `rewrite_string_lit`
Marcus Klaas [Tue, 1 Sep 2015 18:42:07 +0000 (20:42 +0200)]
Remove faulty shortcut in `rewrite_string_lit`

Rustfmt would leave the literal unchanged when it did not exceed the column limit in its original position, not considering its position after formatting.

8 years agoMerge pull request #239 from sinhpham/format_strings_option
Marcus Klaas de Vries [Tue, 1 Sep 2015 18:34:22 +0000 (20:34 +0200)]
Merge pull request #239 from sinhpham/format_strings_option

Format strings option https://github.com/nrc/rustfmt/issues/202

8 years agoMerge pull request #240 from marcusklaas/rustup2
Marcus Klaas de Vries [Tue, 1 Sep 2015 18:32:09 +0000 (20:32 +0200)]
Merge pull request #240 from marcusklaas/rustup2

Rustup

8 years agoRustup
Marcus Klaas [Tue, 1 Sep 2015 18:28:38 +0000 (20:28 +0200)]
Rustup

Fix breakage caused by rust commit 2076cdd.

8 years agoFormat strings option https://github.com/nrc/rustfmt/issues/202
Sinh Pham [Tue, 1 Sep 2015 12:14:52 +0000 (08:14 -0400)]
Format strings option https://github.com/nrc/rustfmt/issues/202

8 years agoSupport where clause predicates at different indentations
Nick Cameron [Tue, 1 Sep 2015 07:04:41 +0000 (19:04 +1200)]
Support where clause predicates at different indentations

8 years agoSupport where predicates on the same line
Nick Cameron [Tue, 1 Sep 2015 06:53:16 +0000 (18:53 +1200)]
Support where predicates on the same line

8 years agoSupport non-indented where clauses
Nick Cameron [Tue, 1 Sep 2015 06:38:12 +0000 (18:38 +1200)]
Support non-indented where clauses

8 years agoSupport different indent styles for generics
Nick Cameron [Tue, 1 Sep 2015 06:20:17 +0000 (18:20 +1200)]
Support different indent styles for generics

8 years agoSupport different tabbing of function args
Nick Cameron [Tue, 1 Sep 2015 05:22:00 +0000 (17:22 +1200)]
Support different tabbing of function args

(Although, frankly anything other than visual is deeply wrong).

8 years agoOption to pack fn args on fewer lines
Nick Cameron [Tue, 1 Sep 2015 05:06:41 +0000 (17:06 +1200)]
Option to pack fn args on fewer lines

8 years agoMerge pull request #237 from posix4e/readme
Nick Cameron [Tue, 1 Sep 2015 04:35:55 +0000 (16:35 +1200)]
Merge pull request #237 from posix4e/readme

rejiggered the readme file