]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agotests for coverage mode
Ravi Shankar [Fri, 23 Oct 2015 14:42:07 +0000 (20:12 +0530)]
tests for coverage mode

8 years agoshow rustfmt coverage!
Ravi Shankar [Wed, 21 Oct 2015 07:26:24 +0000 (12:56 +0530)]
show rustfmt coverage!

8 years agoMerge pull request #471 from defuz/relative-configfile
Nick Cameron [Fri, 23 Oct 2015 23:20:54 +0000 (12:20 +1300)]
Merge pull request #471 from defuz/relative-configfile

Lookup of rustfmt.toml file should be relative from input file

8 years agoLookup rustfmt.toml file is relative from input file, not from current directory
defuz [Fri, 16 Oct 2015 08:08:47 +0000 (11:08 +0300)]
Lookup rustfmt.toml file is relative from input file, not from current directory

8 years agoMerge pull request #530 from marcusklaas/match-inner-block
Nick Cameron [Fri, 23 Oct 2015 22:22:50 +0000 (11:22 +1300)]
Merge pull request #530 from marcusklaas/match-inner-block

Bump match inner block indent a level

8 years agoMerge pull request #529 from marcusklaas/pattern-indent
Nick Cameron [Fri, 23 Oct 2015 22:15:01 +0000 (11:15 +1300)]
Merge pull request #529 from marcusklaas/pattern-indent

Fix indentation for enum-style patterns

8 years agoMerge pull request #528 from marcusklaas/chain-idempotence
Nick Cameron [Fri, 23 Oct 2015 22:14:24 +0000 (11:14 +1300)]
Merge pull request #528 from marcusklaas/chain-idempotence

Restore idempotence for chain formatting

8 years agoMerge pull request #523 from alexcrichton/stable
Marcus Klaas de Vries [Fri, 23 Oct 2015 20:57:43 +0000 (22:57 +0200)]
Merge pull request #523 from alexcrichton/stable

Move to stable Rust

8 years agoUpdate README for stable build
Alex Crichton [Fri, 23 Oct 2015 20:51:29 +0000 (13:51 -0700)]
Update README for stable build

8 years agoAdd test for a macro not containing an exprssion
Alex Crichton [Thu, 22 Oct 2015 23:20:45 +0000 (16:20 -0700)]
Add test for a macro not containing an exprssion

8 years agoTest on stable/beta branches on Travis as well
Alex Crichton [Thu, 22 Oct 2015 22:09:12 +0000 (15:09 -0700)]
Test on stable/beta branches on Travis as well

8 years agoIgnore #[cfg_attr(rustfmt, rustfmt_skip)] functions
Alex Crichton [Thu, 22 Oct 2015 22:02:53 +0000 (15:02 -0700)]
Ignore #[cfg_attr(rustfmt, rustfmt_skip)] functions

This adds to #[rustfmt_skip] but is usable on stable Rust!

8 years agoMove option parsing to crates.io-based getopts crate
Alex Crichton [Thu, 22 Oct 2015 21:38:16 +0000 (14:38 -0700)]
Move option parsing to crates.io-based getopts crate

Should help adding more options in the future as well!

8 years agoRemove dependence on rustc/rustc_driver, use syntex
Alex Crichton [Thu, 22 Oct 2015 21:37:13 +0000 (14:37 -0700)]
Remove dependence on rustc/rustc_driver, use syntex

Instead just parse manually with the `syntex_syntax` crate which is a clone of
libsyntax on crates.io which builds on stable Rust.

8 years agoRemove usage of many unstable features
Alex Crichton [Thu, 22 Oct 2015 21:35:42 +0000 (14:35 -0700)]
Remove usage of many unstable features

This removes usage of:

* PathExt
* split_last
* split_last_mut
* catch_panic

The catch_panic one was a little tricky as the ident interner needed to be
cloned across threads (a little unsafely), but it should otherwise be good to
go.

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 agoBump match inner block indent a level
Marcus Klaas [Fri, 23 Oct 2015 19:20:43 +0000 (21:20 +0200)]
Bump match inner block indent a level

8 years agoFix indentation for enum-style patterns
Marcus Klaas [Fri, 23 Oct 2015 18:44:46 +0000 (20:44 +0200)]
Fix indentation for enum-style patterns

8 years agoRestore idempotence for chain formatting
Marcus Klaas [Fri, 23 Oct 2015 18:36:38 +0000 (20:36 +0200)]
Restore idempotence for chain formatting

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