]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMerge pull request #577 from nrc/docs
Nick Cameron [Tue, 10 Nov 2015 22:16:20 +0000 (11:16 +1300)]
Merge pull request #577 from nrc/docs

Information for new contributors

8 years agoInformation for new contributors
Nick Cameron [Mon, 9 Nov 2015 18:34:44 +0000 (07:34 +1300)]
Information for new contributors

8 years agoMerge pull request #571 from nrc/semi
Marcus Klaas de Vries [Tue, 10 Nov 2015 07:43:29 +0000 (08:43 +0100)]
Merge pull request #571 from nrc/semi

Don't strip semi-colons from expressions with non-void type since it …

8 years agoMerge pull request #576 from boblehest/check_cwd_for_config
Nick Cameron [Mon, 9 Nov 2015 22:05:48 +0000 (17:05 -0500)]
Merge pull request #576 from boblehest/check_cwd_for_config

Check if the CWD contains a config (previously it only checked parents)

8 years agoCheck if the CWD contains a config (previously it only checked parents)
Jørn Lode [Mon, 9 Nov 2015 20:41:25 +0000 (21:41 +0100)]
Check if the CWD contains a config (previously it only checked parents)

8 years agoMerge pull request #573 from nrc/doom_panic
Marcus Klaas de Vries [Mon, 9 Nov 2015 19:17:50 +0000 (20:17 +0100)]
Merge pull request #573 from nrc/doom_panic

Format tuple structs better

8 years agoMerge pull request #575 from nrc/comments
Marcus Klaas de Vries [Mon, 9 Nov 2015 19:15:56 +0000 (20:15 +0100)]
Merge pull request #575 from nrc/comments

Option to disable line breaking in comments

8 years agoOption to disable line breaking in comments
Nick Cameron [Mon, 9 Nov 2015 19:03:01 +0000 (08:03 +1300)]
Option to disable line breaking in comments

Set to false by default for now, since we are having a lot of problems with comments. We should set to true once we have a better algorithm.

8 years agoFormat tuple structs better
Nick Cameron [Mon, 9 Nov 2015 06:00:04 +0000 (19:00 +1300)]
Format tuple structs better

closes #546

8 years agoDon't strip semi-colons from expressions with non-void type since it can change semantics
Nick Cameron [Mon, 9 Nov 2015 00:23:19 +0000 (13:23 +1300)]
Don't strip semi-colons from expressions with non-void type since it can change semantics

8 years agoMerge pull request #567 from kamalmarhubi/config-docs-flag
Nick Cameron [Sun, 8 Nov 2015 03:41:16 +0000 (22:41 -0500)]
Merge pull request #567 from kamalmarhubi/config-docs-flag

Move config help to dedicated --config-help flag

8 years agoMove config help to dedicated --config-help flag
Kamal Marhubi [Sun, 8 Nov 2015 00:03:25 +0000 (19:03 -0500)]
Move config help to dedicated --config-help flag

The existing help output is very verbose, overflowing a 50+ line
terminal. This moves the configuration options to a separate help flag
to make a mistyped command less annoying!

8 years agoMerge pull request #565 from takkanm/fix_unused_variable_path_warning
Nick Cameron [Wed, 4 Nov 2015 23:37:27 +0000 (18:37 -0500)]
Merge pull request #565 from takkanm/fix_unused_variable_path_warning

fix unused variable `path` warning

8 years agofix unused variable `path` warning
Mitsutaka Mimura [Wed, 4 Nov 2015 23:14:55 +0000 (08:14 +0900)]
fix unused variable `path` warning

8 years agoAdd Vim reference to README and reorg
Nick Cameron [Wed, 4 Nov 2015 04:45:01 +0000 (17:45 +1300)]
Add Vim reference to README and reorg

8 years agoMerge pull request #560 from Florob/enum_trailing_comma
Nick Cameron [Tue, 3 Nov 2015 23:59:43 +0000 (18:59 -0500)]
Merge pull request #560 from Florob/enum_trailing_comma

Honor "enum_trailing_comma" option. Fixes #556

8 years agoHonor "enum_trailing_comma" option. Fixes #556
Florian Zeitz [Tue, 3 Nov 2015 22:14:37 +0000 (23:14 +0100)]
Honor "enum_trailing_comma" option. Fixes #556

8 years agoMerge pull request #558 from johannhof/master
Nick Cameron [Tue, 3 Nov 2015 08:39:21 +0000 (03:39 -0500)]
Merge pull request #558 from johannhof/master

Stdin support

8 years agoAddress review concerns
Johann [Tue, 3 Nov 2015 08:16:33 +0000 (09:16 +0100)]
Address review concerns

8 years agoStdin support
Johann [Mon, 2 Nov 2015 19:45:45 +0000 (20:45 +0100)]
Stdin support

Adds support for receiving input from stdin in case no file was
specified. This is useful for editor/IDE integrations and other tooling.

To achieve clean output a new write-mode option called plain was added,
this option is mandatory when using stdin.

8 years agoMerge pull request #543 from eefriedman/macro-crash
Marcus Klaas de Vries [Wed, 28 Oct 2015 07:09:44 +0000 (08:09 +0100)]
Merge pull request #543 from eefriedman/macro-crash

Fix crash speculatively parsing macro arguments as expressions.

8 years agoFix crash speculatively parsing macro arguments as expressions.
Eli Friedman [Wed, 28 Oct 2015 06:41:32 +0000 (23:41 -0700)]
Fix crash speculatively parsing macro arguments as expressions.

The problem is essentially that if we try to parse a token tree using a
CodeMap different from the one the tree was originally parsed with,
spans become nonsense. Since CodeMaps can't be cloned, we're basically
forced to use the original ParseSess for additional parsing.

Ideally, rustfmt would be a bit more clever and figure out how to parse
macro arguments based on the definition of the macro itself, rather than
just guessing that a particular token sequence looks like an expression,
but this is good enough for now.

Fixes #538.

8 years agoMerge pull request #541 from zeckalpha/link-in-readme
Nick Cameron [Tue, 27 Oct 2015 11:47:39 +0000 (07:47 -0400)]
Merge pull request #541 from zeckalpha/link-in-readme

Link in README

8 years agoLink in README
Kyle Marek-Spartz [Tue, 27 Oct 2015 02:51:59 +0000 (21:51 -0500)]
Link in README

8 years agoMerge pull request #531 from marcusklaas/match-inner-block
Nick Cameron [Sun, 25 Oct 2015 17:46:26 +0000 (06:46 +1300)]
Merge pull request #531 from marcusklaas/match-inner-block

Address some issues with multiline patterns in let statements

8 years agoMerge pull request #533 from marcusklaas/double-help
Nick Cameron [Sun, 25 Oct 2015 13:00:39 +0000 (02:00 +1300)]
Merge pull request #533 from marcusklaas/double-help

Print configuration options once in help message

8 years agoMerge pull request #522 from marcusklaas/writing-tests
Marcus Klaas de Vries [Sat, 24 Oct 2015 14:38:51 +0000 (16:38 +0200)]
Merge pull request #522 from marcusklaas/writing-tests

Add a brief overview of rustfmt tests

8 years agoAdd a brief overview of rustfmt tests
Marcus Klaas [Thu, 22 Oct 2015 21:51:19 +0000 (23:51 +0200)]
Add a brief overview of rustfmt tests

8 years agoPrint configuration options once in help message
Marcus Klaas [Sat, 24 Oct 2015 13:30:26 +0000 (15:30 +0200)]
Print configuration options once in help message

8 years agoAddress some issues with multiline patterns in let statements
Marcus Klaas [Sat, 24 Oct 2015 10:19:58 +0000 (12:19 +0200)]
Address some issues with multiline patterns in let statements

8 years agoMerge pull request #515 from Wafflespeanut/coverage
Marcus Klaas de Vries [Sat, 24 Oct 2015 10:06:27 +0000 (12:06 +0200)]
Merge pull request #515 from Wafflespeanut/coverage

Coverage mode for rustfmt...

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