]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoUpdate uses of `rustfmt_skip` to `rustfmt::skip`
Nick Cameron [Mon, 14 May 2018 04:25:10 +0000 (16:25 +1200)]
Update uses of `rustfmt_skip` to `rustfmt::skip`

6 years agoSkip on `rustfmt::skip` as well as `rustfmt_skip`
Nick Cameron [Mon, 14 May 2018 04:11:55 +0000 (16:11 +1200)]
Skip on `rustfmt::skip` as well as `rustfmt_skip`

6 years agoFormat attributes with paths
Nick Cameron [Mon, 14 May 2018 04:04:15 +0000 (16:04 +1200)]
Format attributes with paths

6 years ago0.7.0
Nick Cameron [Sun, 13 May 2018 23:09:40 +0000 (11:09 +1200)]
0.7.0

6 years agoReorder the --help message
Nick Cameron [Sun, 13 May 2018 23:07:54 +0000 (11:07 +1200)]
Reorder the --help message

6 years agoMake some write modes unstable
Nick Cameron [Sun, 13 May 2018 22:41:15 +0000 (10:41 +1200)]
Make some write modes unstable

6 years agoSupport unstable options
Nick Cameron [Sun, 13 May 2018 22:20:51 +0000 (10:20 +1200)]
Support unstable options

cc #1976

6 years agoReplace `--write-mode` with `--emit`
Nick Cameron [Sun, 13 May 2018 02:13:24 +0000 (14:13 +1200)]
Replace `--write-mode` with `--emit`

cc #1976

6 years agoAdd `--backup` flag
Nick Cameron [Sun, 13 May 2018 01:18:08 +0000 (13:18 +1200)]
Add `--backup` flag

6 years agoMerge pull request #2700 from Pazzaz/master
Nick Cameron [Sat, 12 May 2018 22:04:38 +0000 (10:04 +1200)]
Merge pull request #2700 from Pazzaz/master

Remove unnecessary use of Box in `format_function_type`

6 years agoMerge pull request #2702 from andjo403/bump
Nick Cameron [Sat, 12 May 2018 22:03:19 +0000 (10:03 +1200)]
Merge pull request #2702 from andjo403/bump

Update regex, assert_cli, env_logger, rustc-ap-{rustc_target, syntax}

6 years agoUpdate regex, assert_cli, env_logger, rustc-ap-{rustc_target, syntax}
Andreas Jonson [Sat, 12 May 2018 16:58:27 +0000 (18:58 +0200)]
Update regex, assert_cli, env_logger, rustc-ap-{rustc_target, syntax}

this update removes 15 dependencies

6 years agoRemove unnecessary use of Box in `format_function_type`
Pazzaz [Sat, 12 May 2018 08:53:06 +0000 (10:53 +0200)]
Remove unnecessary use of Box in `format_function_type`

6 years agoFix build failure (#2699)
Seiichi Uchida [Sat, 12 May 2018 01:36:34 +0000 (10:36 +0900)]
Fix build failure (#2699)

6 years agoMerge pull request #2693 from gnzlbg/integration
Seiichi Uchida [Fri, 11 May 2018 13:12:37 +0000 (22:12 +0900)]
Merge pull request #2693 from gnzlbg/integration

Add integration tests against crates in the rust-lang-nursery

6 years agoReplace `--dump-minimal-config` and `--dump-default-config` with `--print-config`
Nick Cameron [Fri, 11 May 2018 08:43:08 +0000 (20:43 +1200)]
Replace `--dump-minimal-config` and `--dump-default-config` with `--print-config`

cc #1976

6 years agoAdd `--check` flag.
Nick Cameron [Fri, 11 May 2018 08:26:00 +0000 (20:26 +1200)]
Add `--check` flag.

cc #1976

6 years ago`--help` options
Nick Cameron [Fri, 11 May 2018 08:12:16 +0000 (20:12 +1200)]
`--help` options

cc #1976

6 years agoRemove `--verbose-diff`
Nick Cameron [Fri, 11 May 2018 01:58:34 +0000 (13:58 +1200)]
Remove `--verbose-diff`

Use `--verbose` instead

cc #1976

6 years agoAdd `--quiet` flag, remove `Plain` write mode
Nick Cameron [Fri, 11 May 2018 01:50:30 +0000 (13:50 +1200)]
Add `--quiet` flag, remove `Plain` write mode

cc #1976

6 years agoAdd integration tests against crates in the rust-lang-nursery
gnzlbg [Wed, 9 May 2018 09:57:58 +0000 (11:57 +0200)]
Add integration tests against crates in the rust-lang-nursery

This commit adds integration tests against some crates in the
nursery.

Each integration test is added as a separate build-bot, where
the rust-lang-nursery/${CRATE} is first downloaded and its tests run.
Afterwards, `cargo fmt --all` is applied to the crate, and the tests
are re-run. If the tests fail after formatting, the integration test
fails.

The crates that currently fail are added as allowed-to-fail, but the
intent is that either these crates or rustfmt should be fixed such
that the tests pass.

6 years agoMerge pull request #2687 from Marwes/issue_2641
Nick Cameron [Wed, 9 May 2018 01:18:27 +0000 (13:18 +1200)]
Merge pull request #2687 from Marwes/issue_2641

fix: Don't insert an extra brace in macros with native newlines

6 years agoMerge pull request #2684 from topecongiro/issue-2175
Nick Cameron [Wed, 9 May 2018 01:16:26 +0000 (13:16 +1200)]
Merge pull request #2684 from topecongiro/issue-2175

Apply small parent heuristic only when the chain is at the beginning of the line

6 years agoMerge pull request #2689 from alexcrichton/fix-beta
Nick Cameron [Wed, 9 May 2018 01:14:59 +0000 (13:14 +1200)]
Merge pull request #2689 from alexcrichton/fix-beta

Ensure tests pass on the beta compiler

6 years agoEnsure tests pass on the beta compiler
Alex Crichton [Wed, 9 May 2018 01:04:43 +0000 (18:04 -0700)]
Ensure tests pass on the beta compiler

Also add a travis matrix entry for emulating the beta tests

6 years agoMerge pull request #2685 from alexcrichton/fix-tests
Nick Cameron [Tue, 8 May 2018 20:54:11 +0000 (08:54 +1200)]
Merge pull request #2685 from alexcrichton/fix-tests

Fix rustfmt tests in the Rust repo

6 years agofix: Don't insert an extra brace in macros with native newlines
Markus Westerlind [Tue, 8 May 2018 18:31:33 +0000 (20:31 +0200)]
fix: Don't insert an extra brace in macros with native newlines

Due to `format_snippet` formatting the input with \r\n the subtraction
would wouldn't give a length that removed the }

Fixes #2641

6 years agoFix rustfmt tests in the Rust repo
Alex Crichton [Tue, 8 May 2018 14:32:00 +0000 (07:32 -0700)]
Fix rustfmt tests in the Rust repo

Two tests were executing `cargo run` but `cargo` is not ambiently available to
execute. Instead it's best to execute the rustfmt binary directly, which is
always assembled as part of `cargo test`.

6 years agoCargo fmt
topecongiro [Mon, 7 May 2018 21:25:48 +0000 (06:25 +0900)]
Cargo fmt

6 years agoApply small parent rule only when there is small offset
topecongiro [Mon, 7 May 2018 21:25:06 +0000 (06:25 +0900)]
Apply small parent rule only when there is small offset

6 years agoUpdate tests to use the absolute position for small parent heuristic
topecongiro [Mon, 7 May 2018 21:23:14 +0000 (06:23 +0900)]
Update tests to use the absolute position for small parent heuristic

6 years agoMerge pull request #2675 from flodiebold/non-modrs-mods
Nick Cameron [Sun, 6 May 2018 23:23:14 +0000 (11:23 +1200)]
Merge pull request #2675 from flodiebold/non-modrs-mods

Fix handling of modules in non_modrs_mods style

6 years agoMerge pull request #2682 from topecongiro/issue-2670
Nick Cameron [Sun, 6 May 2018 23:21:02 +0000 (11:21 +1200)]
Merge pull request #2682 from topecongiro/issue-2670

Do not duplicate attributes on use items

6 years agoMerge pull request #2681 from topecongiro/issue-2680
Nick Cameron [Sun, 6 May 2018 23:20:33 +0000 (11:20 +1200)]
Merge pull request #2681 from topecongiro/issue-2680

Error on self_tests when there are lines that exceed max width

6 years agoMerge pull request #2679 from topecongiro/multi-lined-binary
Nick Cameron [Sun, 6 May 2018 22:54:49 +0000 (10:54 +1200)]
Merge pull request #2679 from topecongiro/multi-lined-binary

Put operands on its own line when each fits in a single line

6 years agoMerge pull request #2683 from dzamlo/master
Nick Cameron [Sun, 6 May 2018 22:44:00 +0000 (10:44 +1200)]
Merge pull request #2683 from dzamlo/master

Update README.md to reflect change in #2539

6 years agoUpdate README.md to reflect change in #2539
Loïc Damien [Sun, 6 May 2018 16:51:26 +0000 (18:51 +0200)]
Update README.md to reflect change in #2539

6 years agoTurn the nonmodrs-mods test into a standard idempotence test
Florian Diebold [Sun, 6 May 2018 11:03:11 +0000 (13:03 +0200)]
Turn the nonmodrs-mods test into a standard idempotence test

We need to skip children on foo.rs, since the parser will not find bar from that
file, but with that, the test works fine.

6 years agoDo not duplicate attributes on use items
topecongiro [Sun, 6 May 2018 08:01:14 +0000 (17:01 +0900)]
Do not duplicate attributes on use items

6 years agoAdd a test for duplicated attributes on use items
topecongiro [Sun, 6 May 2018 08:00:51 +0000 (17:00 +0900)]
Add a test for duplicated attributes on use items

6 years agoAdd a test for non-mod.rs mods
Florian Diebold [Fri, 4 May 2018 18:12:06 +0000 (20:12 +0200)]
Add a test for non-mod.rs mods

6 years agoFix handling of modules in non_modrs_mods style
Florian Diebold [Fri, 4 May 2018 09:51:06 +0000 (11:51 +0200)]
Fix handling of modules in non_modrs_mods style

We need to keep track of the module relative to which we're resolving paths,
instead of always passing None.

Fixes #2673.

6 years agoFix up lines exceeding max width
topecongiro [Sun, 6 May 2018 07:17:09 +0000 (16:17 +0900)]
Fix up lines exceeding max width

6 years agoUse rustfmt.toml when running self_tests
topecongiro [Sun, 6 May 2018 07:16:58 +0000 (16:16 +0900)]
Use rustfmt.toml when running self_tests

6 years agoAdd rustfmt.toml
topecongiro [Sun, 6 May 2018 07:16:16 +0000 (16:16 +0900)]
Add rustfmt.toml

6 years agoCargo fmt
topecongiro [Sun, 6 May 2018 06:22:29 +0000 (15:22 +0900)]
Cargo fmt

6 years agoPut operands on its own line when each fits in a single line
topecongiro [Sun, 6 May 2018 06:22:17 +0000 (15:22 +0900)]
Put operands on its own line when each fits in a single line

6 years agoUpdate tests
topecongiro [Sun, 6 May 2018 06:14:47 +0000 (15:14 +0900)]
Update tests

6 years agoAdd tests for simple binary expressions
topecongiro [Sun, 6 May 2018 06:14:30 +0000 (15:14 +0900)]
Add tests for simple binary expressions

6 years agoMerge pull request #2678 from topecongiro/issue-2676
Nick Cameron [Sun, 6 May 2018 04:18:02 +0000 (16:18 +1200)]
Merge pull request #2678 from topecongiro/issue-2676

Do not overflow a long item

6 years agoDo not overflow a long item
topecongiro [Sun, 6 May 2018 03:12:16 +0000 (12:12 +0900)]
Do not overflow a long item

Take the first line's width of a single item into account when
trying to overflow something.

Closes #2676.

6 years agoMerge pull request #2677 from csmoe/remove_nested_parens_opt
Nick Cameron [Sun, 6 May 2018 02:01:17 +0000 (14:01 +1200)]
Merge pull request #2677 from csmoe/remove_nested_parens_opt

Add remove nested parens option

6 years agoadd config test
csmoe [Sun, 6 May 2018 01:23:04 +0000 (09:23 +0800)]
add config test

6 years agoUpdate rustc_ap_syntax
Nick Cameron [Sat, 5 May 2018 21:57:26 +0000 (09:57 +1200)]
Update rustc_ap_syntax

6 years agoUse a different env var for the test directory
Nick Cameron [Sat, 5 May 2018 20:23:26 +0000 (08:23 +1200)]
Use a different env var for the test directory

6 years agoremove nested parens option
csmoe [Sat, 5 May 2018 15:13:49 +0000 (23:13 +0800)]
remove nested parens option

6 years agoMerge pull request #2667 from tspiteri/width-heuristics
Nick Cameron [Thu, 3 May 2018 23:46:28 +0000 (11:46 +1200)]
Merge pull request #2667 from tspiteri/width-heuristics

Do not scale WidthHeuristics when max_width less than 100

6 years agoFix test bug (again)
Nick Cameron [Thu, 3 May 2018 21:35:56 +0000 (09:35 +1200)]
Fix test bug (again)

6 years agoMerge pull request #2671 from csmoe/merge_mix
Nick Cameron [Thu, 3 May 2018 08:08:16 +0000 (20:08 +1200)]
Merge pull request #2671 from csmoe/merge_mix

Make imports_layout = "Mixed" addressed

6 years agofix merge_mix
csmoe [Wed, 2 May 2018 14:11:50 +0000 (22:11 +0800)]
fix merge_mix

6 years agoMake test temp files in the Cargo target directory, if known
Nick Cameron [Wed, 2 May 2018 23:14:01 +0000 (11:14 +1200)]
Make test temp files in the Cargo target directory, if known

6 years agoAdd test for width heuristics
Trevor Spiteri [Wed, 2 May 2018 09:38:23 +0000 (11:38 +0200)]
Add test for width heuristics

6 years agoAdd test for issue 2644
Trevor Spiteri [Wed, 2 May 2018 08:36:12 +0000 (10:36 +0200)]
Add test for issue 2644

6 years agoDo not scale WidthHeuristics when max_width less than 100
Trevor Spiteri [Wed, 2 May 2018 08:36:02 +0000 (10:36 +0200)]
Do not scale WidthHeuristics when max_width less than 100

6 years agoMerge pull request #2666 from topecongiro/issue-2634
Nick Cameron [Tue, 1 May 2018 22:28:46 +0000 (10:28 +1200)]
Merge pull request #2666 from topecongiro/issue-2634

Avoid flip-flopping impl items when reordering them

6 years agoMerge pull request #2665 from topecongiro/issue-2647
Nick Cameron [Tue, 1 May 2018 22:26:49 +0000 (10:26 +1200)]
Merge pull request #2665 from topecongiro/issue-2647

Use correct one line width for list attribute

6 years agoSuppress warning about unused attribute
Nick Cameron [Tue, 1 May 2018 22:18:14 +0000 (10:18 +1200)]
Suppress warning about unused attribute

6 years ago0.6.1
Nick Cameron [Tue, 1 May 2018 21:49:47 +0000 (09:49 +1200)]
0.6.1

6 years agoRun cargo fmt with reorder_impl_items set to true
topecongiro [Mon, 30 Apr 2018 07:24:01 +0000 (16:24 +0900)]
Run cargo fmt with reorder_impl_items set to true

6 years agoAdd a test for #2634
topecongiro [Mon, 30 Apr 2018 07:22:28 +0000 (16:22 +0900)]
Add a test for #2634

6 years agoUse bytepos to compare impl items
topecongiro [Mon, 30 Apr 2018 07:19:52 +0000 (16:19 +0900)]
Use bytepos to compare impl items

6 years agoFactor out visit_impl_items
topecongiro [Mon, 30 Apr 2018 07:13:51 +0000 (16:13 +0900)]
Factor out visit_impl_items

6 years agoUse correct one line width for list attribute
topecongiro [Mon, 30 Apr 2018 06:49:32 +0000 (15:49 +0900)]
Use correct one line width for list attribute

Closes #2647.

6 years agoFix broken test
Nick Cameron [Mon, 30 Apr 2018 01:21:17 +0000 (13:21 +1200)]
Fix broken test

6 years agoMerge pull request #2662 from csmoe/imports_indent
Nick Cameron [Sun, 29 Apr 2018 23:51:03 +0000 (11:51 +1200)]
Merge pull request #2662 from csmoe/imports_indent

Change the default value of imports_indent to IndentStyle::Block

6 years agoMerge branch 'master' into imports_indent
Nick Cameron [Sun, 29 Apr 2018 23:50:53 +0000 (11:50 +1200)]
Merge branch 'master' into imports_indent

6 years agoMerge pull request #2663 from csmoe/config_curr
Nick Cameron [Sun, 29 Apr 2018 23:20:04 +0000 (11:20 +1200)]
Merge pull request #2663 from csmoe/config_curr

set stdin default config path to current dir

6 years agoMerge pull request #2661 from topecongiro/issue-2645
Nick Cameron [Sun, 29 Apr 2018 23:10:48 +0000 (11:10 +1200)]
Merge pull request #2661 from topecongiro/issue-2645

Preserve comments between attribute and use item

6 years agoMerge pull request #2659 from topecongiro/issue-2652
Nick Cameron [Sun, 29 Apr 2018 23:07:33 +0000 (11:07 +1200)]
Merge pull request #2659 from topecongiro/issue-2652

Do not add a trailing comma on array inside macro

6 years agoMerge pull request #2656 from topecongiro/issue-2594
Nick Cameron [Sun, 29 Apr 2018 23:06:33 +0000 (11:06 +1200)]
Merge pull request #2656 from topecongiro/issue-2594

Use consistent formatting for empty enum and struct

6 years agoset stdin default config path to curr
csmoe [Sun, 29 Apr 2018 13:40:37 +0000 (21:40 +0800)]
set stdin default config path to curr

6 years agoupdate tests
csmoe [Sun, 29 Apr 2018 13:03:49 +0000 (21:03 +0800)]
update tests

6 years agoupdate self format
csmoe [Sun, 29 Apr 2018 12:22:48 +0000 (20:22 +0800)]
update self format

6 years agoimport_indent to Block
csmoe [Sun, 29 Apr 2018 11:57:49 +0000 (19:57 +0800)]
import_indent to Block

6 years agoadd rustc_target to dependencies (#2660)
Ryan Leung [Sat, 28 Apr 2018 07:08:58 +0000 (15:08 +0800)]
add rustc_target to dependencies (#2660)

6 years agoUse correct span for UseTree
topecongiro [Sat, 28 Apr 2018 07:05:02 +0000 (16:05 +0900)]
Use correct span for UseTree

6 years agoPreserve comments between attribute and use item
topecongiro [Sat, 28 Apr 2018 07:04:09 +0000 (16:04 +0900)]
Preserve comments between attribute and use item

6 years agoAdd tests for #2645
topecongiro [Sat, 28 Apr 2018 07:03:26 +0000 (16:03 +0900)]
Add tests for #2645

6 years agoPreserve trailing comma inside array
topecongiro [Sat, 28 Apr 2018 06:09:54 +0000 (15:09 +0900)]
Preserve trailing comma inside array

Closes #2652.

6 years agoAdd an test for #2652
topecongiro [Sat, 28 Apr 2018 06:09:36 +0000 (15:09 +0900)]
Add an test for #2652

6 years agoTemporarily fix tests
topecongiro [Sat, 28 Apr 2018 05:07:10 +0000 (14:07 +0900)]
Temporarily fix tests

cc #2655.

6 years agoUse format_empty_struct_or_tuple over format_missing_no_indent
topecongiro [Sat, 28 Apr 2018 05:03:14 +0000 (14:03 +0900)]
Use format_empty_struct_or_tuple over format_missing_no_indent

Closes #2594.

6 years agoUse format_empty_struct_or_tuple
topecongiro [Sat, 28 Apr 2018 04:59:54 +0000 (13:59 +0900)]
Use format_empty_struct_or_tuple

6 years agoFactor out a formatting routine for empty struct and tuple
topecongiro [Sat, 28 Apr 2018 04:59:03 +0000 (13:59 +0900)]
Factor out a formatting routine for empty struct and tuple

6 years agoUse a glob import for import utils
topecongiro [Sat, 28 Apr 2018 04:24:05 +0000 (13:24 +0900)]
Use a glob import for import utils

6 years agoAdd tests for #2594
topecongiro [Sat, 28 Apr 2018 04:23:50 +0000 (13:23 +0900)]
Add tests for #2594

6 years agoMerge pull request #2650 from thibaultdelor/useFailureCrate
Nick Cameron [Fri, 27 Apr 2018 03:14:47 +0000 (15:14 +1200)]
Merge pull request #2650 from thibaultdelor/useFailureCrate

Use failure crate

6 years agoHarden tests to not rely on CWD
Nick Cameron [Thu, 26 Apr 2018 23:12:25 +0000 (11:12 +1200)]
Harden tests to not rely on CWD

6 years agoMerge pull request #2653 from Xanewok/dont-rerun-on-git
Nick Cameron [Thu, 26 Apr 2018 22:41:29 +0000 (10:41 +1200)]
Merge pull request #2653 from Xanewok/dont-rerun-on-git

Ignore checking inexistent .git/HEAD in build.rs

6 years agoIgnore checking inexistent .git/HEAD in build.rs
Igor Matuszewski [Thu, 26 Apr 2018 22:09:01 +0000 (00:09 +0200)]
Ignore checking inexistent .git/HEAD in build.rs