]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMerge pull request #433 from sinhpham/fix_430
Nick Cameron [Fri, 9 Oct 2015 05:51:58 +0000 (18:51 +1300)]
Merge pull request #433 from sinhpham/fix_430

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

8 years agoFix https://github.com/nrc/rustfmt/issues/430
Sinh Pham [Fri, 9 Oct 2015 05:49:16 +0000 (22:49 -0700)]
Fix https://github.com/nrc/rustfmt/issues/430

8 years agoMerge pull request #429 from marcusklaas/method-calls2
Nick Cameron [Thu, 8 Oct 2015 23:27:37 +0000 (12:27 +1300)]
Merge pull request #429 from marcusklaas/method-calls2

Try "overflowing" the final function argument when it's a closure

8 years agoTry "overflowing" the final function argument when it's a closure
Marcus Klaas [Thu, 8 Oct 2015 21:07:19 +0000 (23:07 +0200)]
Try "overflowing" the final function argument when it's a closure

This means that we try formatting the last argument of a function call with block
indentation instead of visual indentation when it is a closure and its first line
fits on the same line as the first arguments.

8 years agoMerge pull request #420 from mwiczer/Issue270
Marcus Klaas de Vries [Thu, 8 Oct 2015 21:38:04 +0000 (23:38 +0200)]
Merge pull request #420 from mwiczer/Issue270

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

8 years agoSupport pre- and post-comments for enums
mwiczer [Wed, 7 Oct 2015 23:23:07 +0000 (19:23 -0400)]
Support pre- and post-comments for enums

Use lists to format enum variants rather than special formatting.
Add tests for enums mostly around block comments.

8 years agoMerge pull request #428 from marcusklaas/macro-fewer-panix
Nick Cameron [Thu, 8 Oct 2015 20:46:01 +0000 (09:46 +1300)]
Merge pull request #428 from marcusklaas/macro-fewer-panix

Prevent panics on list-like macro uses with trailing commas

8 years agoPrevent panics on list-like macro uses with trailing commas
Marcus Klaas [Thu, 8 Oct 2015 20:04:17 +0000 (22:04 +0200)]
Prevent panics on list-like macro uses with trailing commas

8 years agoMerge pull request #423 from nrc/atrib_bug
Marcus Klaas de Vries [Thu, 8 Oct 2015 17:51:30 +0000 (19:51 +0200)]
Merge pull request #423 from nrc/atrib_bug

Format inner and outer attributes separately.

8 years agoMerge pull request #427 from steveklabnik/cargo_style
cassiersg [Thu, 8 Oct 2015 15:22:07 +0000 (17:22 +0200)]
Merge pull request #427 from steveklabnik/cargo_style

Use newer style in Cargo.toml

8 years agoUse newer style in Cargo.toml
Steve Klabnik [Thu, 8 Oct 2015 15:09:54 +0000 (11:09 -0400)]
Use newer style in Cargo.toml

This keeps everything under dependencies, which is nice.

8 years agoMerge pull request #425 from jonas-schievink/patch-1
cassiersg [Thu, 8 Oct 2015 14:20:15 +0000 (16:20 +0200)]
Merge pull request #425 from jonas-schievink/patch-1

Fix typos in config descriptions

8 years agoFix typos in config descriptions
Jonas Schievink [Thu, 8 Oct 2015 14:13:10 +0000 (16:13 +0200)]
Fix typos in config descriptions

8 years agoFormat inner and outer attributes separately.
Nick Cameron [Thu, 8 Oct 2015 04:20:19 +0000 (17:20 +1300)]
Format inner and outer attributes separately.

Actually just skips inner attributes, because its a pain to track them, and lets missed spans handle them.

Closes #413

8 years agoMerge pull request #416 from SingingTree/windows_tests
cassiersg [Wed, 7 Oct 2015 13:50:12 +0000 (15:50 +0200)]
Merge pull request #416 from SingingTree/windows_tests

Fix path issue with tests on Windows

8 years agoFix path issue with tests on Windows
Bryce Van Dyk [Wed, 7 Oct 2015 12:10:07 +0000 (01:10 +1300)]
Fix path issue with tests on Windows

The code that manipulates paths to try and find files in the target dir
was not handling windows file seperators correctly. The code has been
updated to use the path module, and hopefully will play nicer across
operating systems.

8 years agoMerge pull request #404 from marcusklaas/rewrite-list-fmt
Marcus Klaas de Vries [Tue, 6 Oct 2015 20:29:52 +0000 (22:29 +0200)]
Merge pull request #404 from marcusklaas/rewrite-list-fmt

List formatting refactoring

8 years agoIncrease default function call width limit
Marcus Klaas [Tue, 6 Oct 2015 20:13:14 +0000 (22:13 +0200)]
Increase default function call width limit

8 years agoMerge pull request #403 from marcusklaas/casts
Marcus Klaas de Vries [Mon, 5 Oct 2015 17:26:14 +0000 (19:26 +0200)]
Merge pull request #403 from marcusklaas/casts

Format casts, indices and repeated elements

8 years agoMake listItem contain option
Marcus Klaas [Sun, 4 Oct 2015 18:20:15 +0000 (20:20 +0200)]
Make listItem contain option

8 years agoSplit ListTactic decision logic from write_list
Marcus Klaas [Fri, 2 Oct 2015 11:50:24 +0000 (13:50 +0200)]
Split ListTactic decision logic from write_list

8 years agoMerge pull request #398 from sezna/master
Marcus Klaas de Vries [Fri, 2 Oct 2015 19:15:10 +0000 (21:15 +0200)]
Merge pull request #398 from sezna/master

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

8 years agoinfinite while loop fixed, redundancy removed
Alex [Fri, 2 Oct 2015 16:13:07 +0000 (11:13 -0500)]
infinite while loop fixed, redundancy removed

8 years agoAdded punctuation preference
sezna [Tue, 29 Sep 2015 14:38:52 +0000 (09:38 -0500)]
Added punctuation preference

Create test.rs

Delete test.rs

Fixed compile error.

Trying a possible fix on an arithmetic overflow

another try at the test failure...

passed all tests.

Added tests and cleaned up logic as per nrc's critiques

Delete string.rs.old

Delete string.rs.bk

Made changes as per nrc's requests.

Update string_punctuation.rs

Update string_punctuation.rs

fixed logical redundancy

8 years agoUnify pair formatting code
Marcus Klaas [Fri, 2 Oct 2015 10:25:22 +0000 (12:25 +0200)]
Unify pair formatting code

8 years agoFormat repeated element array literals
Marcus Klaas [Fri, 2 Oct 2015 10:00:28 +0000 (12:00 +0200)]
Format repeated element array literals

8 years agoFormat rustfmt's own indices
Marcus Klaas [Fri, 2 Oct 2015 09:48:52 +0000 (11:48 +0200)]
Format rustfmt's own indices

8 years agoFormat indices
Marcus Klaas [Fri, 2 Oct 2015 09:47:03 +0000 (11:47 +0200)]
Format indices

8 years agoFormat type casts
Marcus Klaas [Fri, 2 Oct 2015 09:31:40 +0000 (11:31 +0200)]
Format type casts

8 years agoMerge pull request #402 from tikue/master
Marcus Klaas de Vries [Fri, 2 Oct 2015 06:44:21 +0000 (08:44 +0200)]
Merge pull request #402 from tikue/master

Fix 1-tuple regression.

8 years agoMerge pull request #378 from sinhpham/fix_376
Marcus Klaas de Vries [Fri, 2 Oct 2015 06:42:43 +0000 (08:42 +0200)]
Merge pull request #378 from sinhpham/fix_376

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

8 years agoFix 1-tuple regression.
Tim Kuehn [Thu, 1 Oct 2015 08:58:44 +0000 (01:58 -0700)]
Fix 1-tuple regression.

Add test to prevent future regressions.

8 years agoFix https://github.com/nrc/rustfmt/issues/376
Sinh Pham [Sun, 27 Sep 2015 14:09:08 +0000 (10:09 -0400)]
Fix https://github.com/nrc/rustfmt/issues/376

8 years agoMerge pull request #380 from sinhpham/fix_377
Marcus Klaas de Vries [Tue, 29 Sep 2015 17:40:24 +0000 (19:40 +0200)]
Merge pull request #380 from sinhpham/fix_377

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

8 years agoMerge pull request #396 from scyptnex/refactor-configuration
Marcus Klaas de Vries [Tue, 29 Sep 2015 05:49:46 +0000 (07:49 +0200)]
Merge pull request #396 from scyptnex/refactor-configuration

Refactoring configuration

8 years agoRefactoring configuration
Scyptnex [Mon, 28 Sep 2015 23:38:19 +0000 (09:38 +1000)]
Refactoring configuration

8 years agoMerge pull request #384 from nrc/where-empty
Marcus Klaas de Vries [Mon, 28 Sep 2015 17:43:25 +0000 (19:43 +0200)]
Merge pull request #384 from nrc/where-empty

Option for putting the where clause on the same line as the function …

8 years agoFix https://github.com/nrc/rustfmt/issues/377
Sinh Pham [Sun, 27 Sep 2015 20:32:07 +0000 (16:32 -0400)]
Fix https://github.com/nrc/rustfmt/issues/377

8 years agoMerge pull request #387 from marcusklaas/prevent-overflow
Nick Cameron [Sun, 27 Sep 2015 20:27:44 +0000 (09:27 +1300)]
Merge pull request #387 from marcusklaas/prevent-overflow

Prevent arithmetic overflow handling match arm comments

8 years agoPrevent arithmetic overflow handling match arm comments
Marcus Klaas [Sun, 27 Sep 2015 20:11:17 +0000 (22:11 +0200)]
Prevent arithmetic overflow handling match arm comments

8 years agoOption for putting the where clause on the same line as the function if the body...
Nick Cameron [Sun, 27 Sep 2015 19:46:05 +0000 (08:46 +1300)]
Option for putting the where clause on the same line as the function if the body is empty.

8 years agoMerge pull request #379 from marcusklaas/enum-quik-fix
Nick Cameron [Sun, 27 Sep 2015 18:51:09 +0000 (07:51 +1300)]
Merge pull request #379 from marcusklaas/enum-quik-fix

Fix variant name duplication on rewrite failure

8 years agoMerge pull request #381 from marcusklaas/unchecked-sub
Marcus Klaas de Vries [Sun, 27 Sep 2015 16:11:16 +0000 (18:11 +0200)]
Merge pull request #381 from marcusklaas/unchecked-sub

Remove a few unchecked subtractions, uses of ty_to_string

8 years agoRemove a few unchecked subtractions, uses of ty_to_string
Marcus Klaas [Sun, 27 Sep 2015 15:56:38 +0000 (17:56 +0200)]
Remove a few unchecked subtractions, uses of ty_to_string

8 years agoFix variant name duplication on rewrite failure
Marcus Klaas [Sun, 27 Sep 2015 15:23:37 +0000 (17:23 +0200)]
Fix variant name duplication on rewrite failure

8 years agoMerge pull request #374 from nrc/fix-fn
Marcus Klaas de Vries [Sun, 27 Sep 2015 12:52:08 +0000 (14:52 +0200)]
Merge pull request #374 from nrc/fix-fn

Use max width for function decls, not ideal width

8 years agoMerge pull request #370 from marcusklaas/match-arm-delining
Marcus Klaas de Vries [Sun, 27 Sep 2015 10:00:57 +0000 (12:00 +0200)]
Merge pull request #370 from marcusklaas/match-arm-delining

Improve heuristics for match arm body placement

8 years agoAdd extra tests for match arm placement
Marcus Klaas [Sun, 27 Sep 2015 09:58:26 +0000 (11:58 +0200)]
Add extra tests for match arm placement

8 years agoFixup tests
Nick Cameron [Sun, 27 Sep 2015 06:39:58 +0000 (19:39 +1300)]
Fixup tests

8 years agoUse max width for function decls, etc.
Nick Cameron [Sun, 27 Sep 2015 06:30:32 +0000 (19:30 +1300)]
Use max width for function decls, etc.

We were using ideal width + leeway before. This means we can remove leeway from the config. We could remove ideal_width too, but I want to use it for comments.

8 years agoMinor refactoring in compute_budgets_for_args
Nick Cameron [Sun, 27 Sep 2015 06:25:04 +0000 (19:25 +1300)]
Minor refactoring in compute_budgets_for_args

8 years agoMerge pull request #368 from nrc/struct-wide
Nick Cameron [Sat, 26 Sep 2015 21:50:50 +0000 (10:50 +1300)]
Merge pull request #368 from nrc/struct-wide

Use a width heuristic for struct lits

8 years agoFix match arm indentation bug
Marcus Klaas [Sat, 26 Sep 2015 21:16:11 +0000 (23:16 +0200)]
Fix match arm indentation bug

8 years agoImprove heuristics for match arm body placement
Marcus Klaas [Sat, 26 Sep 2015 16:16:07 +0000 (18:16 +0200)]
Improve heuristics for match arm body placement

8 years agoMerge pull request #367 from nrc/self-alias
Marcus Klaas de Vries [Sat, 26 Sep 2015 16:25:05 +0000 (18:25 +0200)]
Merge pull request #367 from nrc/self-alias

Format imports with aliases.

8 years agoFix tests
Nick Cameron [Sat, 26 Sep 2015 06:35:17 +0000 (18:35 +1200)]
Fix tests

8 years agoChanges to rustfmt source
Nick Cameron [Sat, 26 Sep 2015 06:29:48 +0000 (18:29 +1200)]
Changes to rustfmt source

8 years agoadd test
Nick Cameron [Sat, 26 Sep 2015 06:27:51 +0000 (18:27 +1200)]
add test

8 years agoUse a width heuristic for struct lits.
Nick Cameron [Sat, 26 Sep 2015 06:25:41 +0000 (18:25 +1200)]
Use a width heuristic for struct lits.

Closes #123

8 years agoFormat imports with aliases.
Nick Cameron [Sat, 26 Sep 2015 06:12:25 +0000 (18:12 +1200)]
Format imports with aliases.

Closes #366

8 years agoMerge pull request #354 from nrc/max-fn
Nick Cameron [Sat, 26 Sep 2015 02:05:22 +0000 (14:05 +1200)]
Merge pull request #354 from nrc/max-fn

Use vertical formatting when function args width > limit

8 years agorebasing changes and address review comment
Nick Cameron [Sat, 26 Sep 2015 02:00:19 +0000 (14:00 +1200)]
rebasing changes and address review comment

8 years agoFix tests
Nick Cameron [Wed, 23 Sep 2015 23:15:08 +0000 (11:15 +1200)]
Fix tests

8 years agoChanges to source formatting
Nick Cameron [Wed, 23 Sep 2015 23:01:01 +0000 (11:01 +1200)]
Changes to source formatting

8 years agoHeuristic max width for function calls
Nick Cameron [Wed, 23 Sep 2015 23:00:14 +0000 (11:00 +1200)]
Heuristic max width for function calls

8 years agoMerge pull request #352 from nrc/ty_parens_fix
Nick Cameron [Sat, 26 Sep 2015 01:50:00 +0000 (13:50 +1200)]
Merge pull request #352 from nrc/ty_parens_fix

Formatting of some types

8 years agoFormatting of some types
Nick Cameron [Wed, 23 Sep 2015 20:36:21 +0000 (08:36 +1200)]
Formatting of some types

Closes #341

8 years agoMerge pull request #362 from marcusklaas/rewrite-string
Nick Cameron [Sat, 26 Sep 2015 01:36:59 +0000 (13:36 +1200)]
Merge pull request #362 from marcusklaas/rewrite-string

Make rewrite_string return `Option<String>`

8 years agoMerge pull request #365 from marcusklaas/format-struct-panic
Nick Cameron [Sat, 26 Sep 2015 01:35:41 +0000 (13:35 +1200)]
Merge pull request #365 from marcusklaas/format-struct-panic

Use the maximum available width in struct formatting

8 years agoUse the maximum available width in struct formatting
Marcus Klaas [Fri, 25 Sep 2015 14:53:44 +0000 (16:53 +0200)]
Use the maximum available width in struct formatting

Previously, we'd use an approximation for the maximum width since the configuration wasn't available in `write_list`.

8 years agoMerge pull request #363 from marcusklaas/rustup35
Marcus Klaas de Vries [Fri, 25 Sep 2015 11:28:09 +0000 (13:28 +0200)]
Merge pull request #363 from marcusklaas/rustup35

Adjust for changed representation of box expressions in AST

8 years agoAdjust for changed representation of box expressions in AST
Marcus Klaas [Fri, 25 Sep 2015 11:25:52 +0000 (13:25 +0200)]
Adjust for changed representation of box expressions in AST

8 years agoMake rewrite_string return `Option<String>`
Marcus Klaas [Fri, 25 Sep 2015 10:53:25 +0000 (12:53 +0200)]
Make rewrite_string return `Option<String>`

8 years agoMerge pull request #359 from eefriedman/rewrite-addrof
Nick Cameron [Thu, 24 Sep 2015 08:30:54 +0000 (20:30 +1200)]
Merge pull request #359 from eefriedman/rewrite-addrof

Add support for formatting AddrOf (unary "&").

8 years agoAdd support for formatting AddrOf (unary "&").
Eli Friedman [Thu, 24 Sep 2015 08:13:57 +0000 (01:13 -0700)]
Add support for formatting AddrOf (unary "&").

8 years agoMerge pull request #358 from eefriedman/rewrite-return
Nick Cameron [Thu, 24 Sep 2015 06:19:37 +0000 (18:19 +1200)]
Merge pull request #358 from eefriedman/rewrite-return

Add support for formatting "return" expressions.

8 years agoAdd support for formatting "return" expressions.
Eli Friedman [Thu, 24 Sep 2015 05:51:37 +0000 (22:51 -0700)]
Add support for formatting "return" expressions.

Fixes #303.

8 years agoExhaustively enumerate expressions in expression rewriting.
Eli Friedman [Thu, 24 Sep 2015 05:51:37 +0000 (22:51 -0700)]
Exhaustively enumerate expressions in expression rewriting.

8 years agoMerge pull request #357 from scyptnex/match-comma-retention
Nick Cameron [Thu, 24 Sep 2015 02:07:39 +0000 (14:07 +1200)]
Merge pull request #357 from scyptnex/match-comma-retention

fix for #355 and test cases

8 years agofix for #355 and test cases
Scyptnex [Thu, 24 Sep 2015 02:01:48 +0000 (12:01 +1000)]
fix for #355 and test cases

8 years agoMerge pull request #347 from scyptnex/issue339-match_block_collapse
Nick Cameron [Thu, 24 Sep 2015 00:28:35 +0000 (12:28 +1200)]
Merge pull request #347 from scyptnex/issue339-match_block_collapse

match arms collapse for issue #339

8 years agoFixes #339 and #272
Scyptnex [Thu, 24 Sep 2015 00:22:06 +0000 (10:22 +1000)]
Fixes #339 and #272

8 years agoMerge pull request #349 from globin/rust-nightly-update
Nick Cameron [Wed, 23 Sep 2015 19:10:15 +0000 (07:10 +1200)]
Merge pull request #349 from globin/rust-nightly-update

Adapt to rust sytax::ast::Mac changes

8 years agoadapt to rust sytax::ast::Mac changes
Robin Gloster [Wed, 23 Sep 2015 18:31:31 +0000 (18:31 +0000)]
adapt to rust sytax::ast::Mac changes

8 years agoMerge pull request #345 from Manishearth/fix-match
Nick Cameron [Tue, 22 Sep 2015 05:00:18 +0000 (17:00 +1200)]
Merge pull request #345 from Manishearth/fix-match

Handle comments in match better (fixes #344)

8 years agoAdd tests, reformat expr
Manish Goregaokar [Tue, 22 Sep 2015 01:27:52 +0000 (06:57 +0530)]
Add tests, reformat expr

8 years agoMerge pull request #331 from marcusklaas/extern
Marcus Klaas de Vries [Mon, 21 Sep 2015 18:05:27 +0000 (20:05 +0200)]
Merge pull request #331 from marcusklaas/extern

Format foreign functions and statics

8 years agoFormat foreign functions and statics
Marcus Klaas [Mon, 21 Sep 2015 18:02:45 +0000 (20:02 +0200)]
Format foreign functions and statics

8 years agoMerge pull request #334 from marcusklaas/sparse-mods
Marcus Klaas de Vries [Mon, 21 Sep 2015 17:42:36 +0000 (19:42 +0200)]
Merge pull request #334 from marcusklaas/sparse-mods

Place the closing brace of an inline mod on a new line

8 years agoHandle comments in match better (fixes #344)
Manish Goregaokar [Mon, 21 Sep 2015 12:10:59 +0000 (17:40 +0530)]
Handle comments in match better (fixes #344)

8 years agoMerge pull request #336 from marcusklaas/struct-overflow
Nick Cameron [Sun, 20 Sep 2015 22:34:36 +0000 (10:34 +1200)]
Merge pull request #336 from marcusklaas/struct-overflow

Fix struct overflows

8 years agoFix struct overflows
Marcus Klaas [Sun, 20 Sep 2015 16:44:49 +0000 (18:44 +0200)]
Fix struct overflows

8 years agoMerge pull request #335 from Kha/struct-lit-base
Marcus Klaas de Vries [Sun, 20 Sep 2015 15:42:23 +0000 (17:42 +0200)]
Merge pull request #335 from Kha/struct-lit-base

Fix negative overflow and missing '..' on struct lit base exprs

8 years agoFix negative overflow and missing '..' on struct lit base exprs
Sebastian Ullrich [Sun, 20 Sep 2015 13:18:41 +0000 (15:18 +0200)]
Fix negative overflow and missing '..' on struct lit base exprs

8 years agoPlace the closing brace of an inline mod on a new line
Marcus Klaas [Sun, 20 Sep 2015 12:22:12 +0000 (14:22 +0200)]
Place the closing brace of an inline mod on a new line

8 years agoMerge pull request #290 from SiegeLord/tabs
Marcus Klaas de Vries [Sun, 20 Sep 2015 10:27:16 +0000 (12:27 +0200)]
Merge pull request #290 from SiegeLord/tabs

Initial implementation of hard tab indentation.

8 years agoRemove unnecessary config parameter from format_missing_with_indent.
Pavel Sountsov [Sat, 19 Sep 2015 17:44:28 +0000 (10:44 -0700)]
Remove unnecessary config parameter from format_missing_with_indent.

8 years agoAdd some tests for hard tab mode.
Pavel Sountsov [Sat, 19 Sep 2015 07:00:53 +0000 (00:00 -0700)]
Add some tests for hard tab mode.

8 years agoUse the block_indent inside visit_expr.
Pavel Sountsov [Sat, 19 Sep 2015 06:57:27 +0000 (23:57 -0700)]
Use the block_indent inside visit_expr.

This seems to pass all the tests and greatly improves the formatting output
when using hard tabs.

8 years agoAdd Indent::none(), remove make_indent.
Pavel Sountsov [Sat, 19 Sep 2015 04:50:44 +0000 (21:50 -0700)]
Add Indent::none(), remove make_indent.