]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoUse the log/env_logger crates from crates.io
Alex Crichton [Thu, 22 Oct 2015 21:34:05 +0000 (14:34 -0700)]
Use the log/env_logger crates from crates.io

8 years agoMerge pull request #485 from marcusklaas/floaters2
Marcus Klaas de Vries [Thu, 22 Oct 2015 20:33:24 +0000 (22:33 +0200)]
Merge pull request #485 from marcusklaas/floaters2

Deal with floaters

8 years agoDeal with floating links in chains
Marcus Klaas [Sun, 18 Oct 2015 15:56:13 +0000 (17:56 +0200)]
Deal with floating links in chains

8 years agoMerge pull request #517 from eefriedman/match-comma
Nick Cameron [Wed, 21 Oct 2015 21:56:02 +0000 (10:56 +1300)]
Merge pull request #517 from eefriedman/match-comma

Improve handling of commas after match arms.

8 years agoImprove handling of commas after match arms.
Eli Friedman [Wed, 21 Oct 2015 21:35:45 +0000 (14:35 -0700)]
Improve handling of commas after match arms.

Fixes #507. Fixes #508.

8 years agoMerge pull request #516 from eefriedman/remove-walk
Nick Cameron [Wed, 21 Oct 2015 21:08:17 +0000 (10:08 +1300)]
Merge pull request #516 from eefriedman/remove-walk

Don't use `visit::walk_*`.  Instead, recurse by hand.

8 years agoDon't use `visit::walk_*`. Instead, recurse by hand.
Eli Friedman [Wed, 21 Oct 2015 20:21:14 +0000 (13:21 -0700)]
Don't use `visit::walk_*`.  Instead, recurse by hand.

This is much more straightforward to understand given how rustfmt
rewriting works, and it avoids walking into expressions in unexpected
places.

Fixes #513. Fixes #514.

8 years agoMerge pull request #505 from tikue/master
Marcus Klaas de Vries [Tue, 20 Oct 2015 18:14:27 +0000 (20:14 +0200)]
Merge pull request #505 from tikue/master

Fix doc comment regression and add tests.

8 years agoFix doc comment regression and add tests.
Tim Kuehn [Tue, 20 Oct 2015 09:12:52 +0000 (02:12 -0700)]
Fix doc comment regression and add tests.

8 years agoMerge pull request #445 from marcusklaas/comments
Marcus Klaas de Vries [Mon, 19 Oct 2015 21:09:04 +0000 (23:09 +0200)]
Merge pull request #445 from marcusklaas/comments

Format more comments

8 years agoFix large block comments
Marcus Klaas [Mon, 19 Oct 2015 19:41:47 +0000 (21:41 +0200)]
Fix large block comments

8 years agoRemove overflow indentation
Marcus Klaas [Mon, 19 Oct 2015 19:41:18 +0000 (21:41 +0200)]
Remove overflow indentation

8 years agoImplement CommentCodeSlices
Marcus Klaas [Mon, 19 Oct 2015 19:40:00 +0000 (21:40 +0200)]
Implement CommentCodeSlices

8 years agoMerge pull request #473 from marcusklaas/empty-struktz
Nick Cameron [Mon, 19 Oct 2015 20:13:20 +0000 (09:13 +1300)]
Merge pull request #473 from marcusklaas/empty-struktz

Refactor enum formatting

8 years agoRefactor enum formatting
Marcus Klaas [Sun, 18 Oct 2015 22:25:38 +0000 (00:25 +0200)]
Refactor enum formatting

8 years agoMerge pull request #484 from marcusklaas/patternz
Marcus Klaas de Vries [Mon, 19 Oct 2015 18:20:29 +0000 (20:20 +0200)]
Merge pull request #484 from marcusklaas/patternz

Format some patterns

8 years agoMerge pull request #500 from marcusklaas/pub-statix
Nick Cameron [Mon, 19 Oct 2015 18:17:01 +0000 (07:17 +1300)]
Merge pull request #500 from marcusklaas/pub-statix

Format visibility for statics and consts

8 years agoFormat some patterns
Marcus Klaas [Sat, 17 Oct 2015 13:56:53 +0000 (15:56 +0200)]
Format some patterns

8 years agoFormat visibility for statics and consts
Marcus Klaas [Mon, 19 Oct 2015 18:08:03 +0000 (20:08 +0200)]
Format visibility for statics and consts

8 years agoMerge pull request #487 from marcusklaas/konsts-n-statix
Marcus Klaas de Vries [Sun, 18 Oct 2015 21:03:01 +0000 (23:03 +0200)]
Merge pull request #487 from marcusklaas/konsts-n-statix

Format constants and static variables

8 years agoFactor out common item indentation idiom
Marcus Klaas [Sun, 18 Oct 2015 20:59:39 +0000 (22:59 +0200)]
Factor out common item indentation idiom

8 years agoMerge pull request #488 from marcusklaas/fn-arg-indents
Nick Cameron [Sun, 18 Oct 2015 20:29:56 +0000 (09:29 +1300)]
Merge pull request #488 from marcusklaas/fn-arg-indents

Fix indentation for function arguments

8 years agoFix indentation for function arguments
Marcus Klaas [Sun, 18 Oct 2015 20:21:46 +0000 (22:21 +0200)]
Fix indentation for function arguments

8 years agoFormat constants and static variables
Marcus Klaas [Sun, 18 Oct 2015 19:25:30 +0000 (21:25 +0200)]
Format constants and static variables

8 years agoMerge pull request #479 from marcusklaas/moar-types
Nick Cameron [Sun, 18 Oct 2015 02:40:11 +0000 (15:40 +1300)]
Merge pull request #479 from marcusklaas/moar-types

Format more type variants

8 years agoMerge pull request #474 from marcusklaas/fn-indent
Nick Cameron [Sun, 18 Oct 2015 02:19:32 +0000 (15:19 +1300)]
Merge pull request #474 from marcusklaas/fn-indent

Properly indent pub fns in extern blocks

8 years agoMerge pull request #475 from marcusklaas/vektorz
Nick Cameron [Sun, 18 Oct 2015 02:17:49 +0000 (15:17 +1300)]
Merge pull request #475 from marcusklaas/vektorz

Format vec! macro using brackets

8 years agoMerge pull request #482 from sinhpham/refactor_write_snippet
Marcus Klaas de Vries [Sat, 17 Oct 2015 21:50:29 +0000 (23:50 +0200)]
Merge pull request #482 from sinhpham/refactor_write_snippet

Refactor write_snippet

8 years agoRefactor write_snippet
Sinh Pham [Sat, 17 Oct 2015 18:35:47 +0000 (11:35 -0700)]
Refactor write_snippet

8 years agoFormat more type variants
Marcus Klaas [Sat, 17 Oct 2015 12:19:55 +0000 (14:19 +0200)]
Format more type variants

8 years agoProperly indent pub fns in extern blocks
Marcus Klaas [Fri, 16 Oct 2015 20:05:44 +0000 (22:05 +0200)]
Properly indent pub fns in extern blocks

8 years agoFormat vec! macro using brackets
Marcus Klaas [Fri, 16 Oct 2015 20:54:32 +0000 (22:54 +0200)]
Format vec! macro using brackets

8 years agoMerge pull request #472 from marcusklaas/rustup4000
Marcus Klaas de Vries [Fri, 16 Oct 2015 16:16:48 +0000 (18:16 +0200)]
Merge pull request #472 from marcusklaas/rustup4000

Remove unsafe push and pop variants

8 years agoRemove unsafe push and pop variants
Marcus Klaas [Fri, 16 Oct 2015 16:11:46 +0000 (18:11 +0200)]
Remove unsafe push and pop variants

8 years agoMerge pull request #464 from marcusklaas/semicolonz
Marcus Klaas de Vries [Thu, 15 Oct 2015 19:03:38 +0000 (21:03 +0200)]
Merge pull request #464 from marcusklaas/semicolonz

Force semicolons after break/continue/return. Remove after blocks.

8 years agoMerge pull request #469 from marcusklaas/rustup300
Marcus Klaas de Vries [Thu, 15 Oct 2015 18:50:33 +0000 (20:50 +0200)]
Merge pull request #469 from marcusklaas/rustup300

Adjust for unified enum variants and structs

8 years agoAdjust for unified enum variants and structs
Marcus Klaas [Thu, 15 Oct 2015 18:37:36 +0000 (20:37 +0200)]
Adjust for unified enum variants and structs

8 years agoForce semicolons after break/continue/return. Remove after blocks.
Marcus Klaas [Wed, 14 Oct 2015 20:28:17 +0000 (22:28 +0200)]
Force semicolons after break/continue/return. Remove after blocks.

8 years agoMerge pull request #461 from marcusklaas/hard-tab-chains
Nick Cameron [Wed, 14 Oct 2015 19:40:01 +0000 (08:40 +1300)]
Merge pull request #461 from marcusklaas/hard-tab-chains

Indent uncontinued chains to block level

8 years agoIndent uncontinued chains to block level
Marcus Klaas [Wed, 14 Oct 2015 17:41:29 +0000 (19:41 +0200)]
Indent uncontinued chains to block level

8 years agoMerge pull request #453 from gsvolt/issue353
Nick Cameron [Tue, 13 Oct 2015 07:16:43 +0000 (20:16 +1300)]
Merge pull request #453 from gsvolt/issue353

Issue353

8 years agoadded semicolons for return statements
Gaurav Saxena [Tue, 13 Oct 2015 06:22:35 +0000 (02:22 -0400)]
added semicolons for return statements

8 years agoadded semicolons to break statements
Gaurav Saxena [Tue, 13 Oct 2015 06:17:51 +0000 (02:17 -0400)]
added semicolons to break statements

8 years agoMerge pull request #449 from marcusklaas/array-block-indent
Nick Cameron [Mon, 12 Oct 2015 23:11:05 +0000 (12:11 +1300)]
Merge pull request #449 from marcusklaas/array-block-indent

Use visual block indentation for array literals

8 years agoUse visual block indentation for array literals
Marcus Klaas [Mon, 12 Oct 2015 19:14:12 +0000 (21:14 +0200)]
Use visual block indentation for array literals

8 years agoMerge pull request #443 from marcusklaas/variadic-fns
Marcus Klaas de Vries [Sun, 11 Oct 2015 19:01:10 +0000 (21:01 +0200)]
Merge pull request #443 from marcusklaas/variadic-fns

Format variadic arguments

8 years agoFormat variadic arguments
Marcus Klaas [Sat, 10 Oct 2015 20:53:20 +0000 (22:53 +0200)]
Format variadic arguments

8 years agoMerge pull request #437 from iwillspeak/master
Nick Cameron [Sat, 10 Oct 2015 19:16:44 +0000 (08:16 +1300)]
Merge pull request #437 from iwillspeak/master

Fix Build to Compile with 1.5.0-nightly (87cd2c082)

8 years agoFix Build to Compile with 1.5.0-nightly (87cd2c082)
Will Speak [Sat, 10 Oct 2015 18:02:25 +0000 (19:02 +0100)]
Fix Build to Compile with 1.5.0-nightly (87cd2c082)

There was an extra, unused, paramter int he match arm which causes an
error when compiling with the latest nightly.

8 years agoMerge pull request #432 from nrc/long-tuple
Nick Cameron [Sat, 10 Oct 2015 01:58:33 +0000 (14:58 +1300)]
Merge pull request #432 from nrc/long-tuple

Handle multi-line return types and multi-line tuples

8 years agoHandle multi-line return types and multi-line tuples
Nick Cameron [Fri, 9 Oct 2015 03:07:14 +0000 (16:07 +1300)]
Handle multi-line return types and multi-line tuples

Closes #409

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