]> git.lizzy.rs Git - rust.git/log
rust.git
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 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

6 years agoAllow `io::Error` to live longer before being wrapped in a `failure::Error`
Tibo [Thu, 26 Apr 2018 04:20:06 +0000 (14:20 +1000)]
Allow `io::Error` to live longer before being wrapped in a `failure::Error`

6 years agoReplace completely std::error with failure crate
Tibo [Thu, 26 Apr 2018 03:48:48 +0000 (13:48 +1000)]
Replace completely std::error with failure crate

6 years agoUse failure for FormattingError
Tibo [Tue, 24 Apr 2018 08:10:09 +0000 (18:10 +1000)]
Use failure for FormattingError

6 years agoReplace std::Error with failure for FormatDiff
Tibo [Tue, 24 Apr 2018 05:45:28 +0000 (15:45 +1000)]
Replace std::Error with failure for FormatDiff

6 years agoCargo update and clippy (#2643)
Seiichi Uchida [Tue, 24 Apr 2018 22:21:23 +0000 (07:21 +0900)]
Cargo update and clippy (#2643)

6 years agoMerge pull request #2640 from rizakrko/master
Nick Cameron [Mon, 23 Apr 2018 04:32:36 +0000 (16:32 +1200)]
Merge pull request #2640 from rizakrko/master

keep auto trait

6 years agoadded test for #2637
Roman Stoliar [Sun, 22 Apr 2018 22:31:21 +0000 (01:31 +0300)]
added test for #2637

6 years agokeep auto trait
Roman Stoliar [Fri, 20 Apr 2018 14:31:31 +0000 (17:31 +0300)]
keep auto trait

6 years agoMake some more stuff private
Nick Cameron [Fri, 20 Apr 2018 10:10:48 +0000 (22:10 +1200)]
Make some more stuff private

0.6

6 years agoRefactor to make a sensible public API
Nick Cameron [Fri, 20 Apr 2018 09:08:20 +0000 (21:08 +1200)]
Refactor to make a sensible public API

0.5 - lots of breaking changes

cc #2639

6 years agoGet exit codes right
Nick Cameron [Fri, 20 Apr 2018 02:17:56 +0000 (14:17 +1200)]
Get exit codes right

6 years agoAdd a verbose-diff option
Nick Cameron [Fri, 20 Apr 2018 02:02:44 +0000 (14:02 +1200)]
Add a verbose-diff option

And don't print end of line characters by default in diffs

cc #2536

6 years agoRefactoring around write mode in main
Nick Cameron [Fri, 20 Apr 2018 01:42:27 +0000 (13:42 +1200)]
Refactoring around write mode in main

6 years agoTrivial refactoring in bin
Nick Cameron [Fri, 20 Apr 2018 01:24:45 +0000 (13:24 +1200)]
Trivial refactoring in bin

6 years agoImplemented rough draft of `check` write mode. (#2539)
David Barsky [Thu, 19 Apr 2018 23:14:11 +0000 (19:14 -0400)]
Implemented rough draft of `check` write mode. (#2539)

* Add rough draft of `check` mode. Not unit tested.

* Added assert-cli; simple test case for `--write-mode=check`

* Lightly documented `check` WriteMode

* wrote clearer phrasing for config::options::WriteMode::Check

* Implemented default for WriteMode where default is Overwrite

* Simplified exit code handling

* updated README.md as per @nrc' comment

* collapsed exit-code handling

* Removed write_mode from Summary, introduced partial option parsing earlier

* Handle write-mode parsing in a slightly better way.

6 years agoMerge pull request #2632 from phansch/master
Nick Cameron [Thu, 19 Apr 2018 18:56:03 +0000 (06:56 +1200)]
Merge pull request #2632 from phansch/master

Link to official nightly documentation

6 years agoLink to official nightly documentation
Philipp Hansch [Thu, 19 Apr 2018 06:22:13 +0000 (08:22 +0200)]
Link to official nightly documentation

Since https://github.com/rust-lang/rust-central-station/pull/40 has been
merged, we have a stable location for the nightly docs.

6 years agoUpdate rustc_ap_syntax
Nick Cameron [Tue, 17 Apr 2018 20:19:57 +0000 (08:19 +1200)]
Update rustc_ap_syntax

6 years agoFix example for reorder_imports (#2628)
Mateusz Mikuła [Tue, 17 Apr 2018 14:04:15 +0000 (16:04 +0200)]
Fix example for reorder_imports (#2628)

Default value changed in #2605

6 years agoMerge pull request #2624 from sinkuu/dots
Nick Cameron [Tue, 17 Apr 2018 08:16:48 +0000 (20:16 +1200)]
Merge pull request #2624 from sinkuu/dots

Add spaces between consecutive `..` `..=`

6 years agoAdd spaces between consecutive `..` `..=`
Shotaro Yamada [Mon, 16 Apr 2018 08:11:50 +0000 (17:11 +0900)]
Add spaces between consecutive `..` `..=`

6 years agoupdate rustc-ap-syntax (#2622)
csmoe [Sun, 15 Apr 2018 09:49:47 +0000 (17:49 +0800)]
update rustc-ap-syntax (#2622)

* update rustc-ap-syntax-100.0.0

6 years agoFix tests
Nick Cameron [Fri, 13 Apr 2018 22:20:08 +0000 (10:20 +1200)]
Fix tests

6 years agoFallout from removing TupField
Nick Cameron [Fri, 13 Apr 2018 22:15:39 +0000 (10:15 +1200)]
Fallout from removing TupField

6 years agoUpdate rustc-ap-syntax
Nick Cameron [Fri, 13 Apr 2018 21:47:13 +0000 (09:47 +1200)]
Update rustc-ap-syntax

6 years agoUpdate rustc_ap_syntax
Nick Cameron [Thu, 12 Apr 2018 22:34:23 +0000 (10:34 +1200)]
Update rustc_ap_syntax

6 years agonightly-0.4.2
Nick Cameron [Thu, 12 Apr 2018 05:06:30 +0000 (17:06 +1200)]
nightly-0.4.2

6 years agoFix tests
Nick Cameron [Thu, 12 Apr 2018 05:05:34 +0000 (17:05 +1200)]
Fix tests

6 years agoMerge pull request #2618 from topecongiro/issue-1174
Nick Cameron [Thu, 12 Apr 2018 04:56:00 +0000 (16:56 +1200)]
Merge pull request #2618 from topecongiro/issue-1174

Output xml header and footer only once

6 years agoOutput xml header and footer only once
Seiichi Uchida [Thu, 12 Apr 2018 04:45:12 +0000 (13:45 +0900)]
Output xml header and footer only once

6 years agoMerge pull request #2603 from topecongiro/merge-nested-imports
Nick Cameron [Thu, 12 Apr 2018 04:40:06 +0000 (16:40 +1200)]
Merge pull request #2603 from topecongiro/merge-nested-imports

Merge imports

6 years agoMerge pull request #2617 from topecongiro/issue-2616
Nick Cameron [Thu, 12 Apr 2018 04:38:52 +0000 (16:38 +1200)]
Merge pull request #2617 from topecongiro/issue-2616

Preserve trailing comma on macro call when using mixed layout

6 years agoCargo update
Seiichi Uchida [Thu, 12 Apr 2018 03:48:27 +0000 (12:48 +0900)]
Cargo update

6 years agoPreserve trailing comma on macro call when using mixed layout
Seiichi Uchida [Thu, 12 Apr 2018 00:54:00 +0000 (09:54 +0900)]
Preserve trailing comma on macro call when using mixed layout

6 years agoMerge pull request #2605 from nrc/import-squelch
Nick Cameron [Tue, 10 Apr 2018 22:57:16 +0000 (10:57 +1200)]
Merge pull request #2605 from nrc/import-squelch

Coalesce some of the import options

6 years agoReview changes
Nick Cameron [Tue, 10 Apr 2018 22:50:19 +0000 (10:50 +1200)]
Review changes

6 years agorebasing
Nick Cameron [Fri, 6 Apr 2018 09:11:50 +0000 (21:11 +1200)]
rebasing

6 years agoUpdate tests
Nick Cameron [Fri, 16 Mar 2018 08:28:02 +0000 (21:28 +1300)]
Update tests

6 years agoSquash the various 'reorder imports' option into one
Nick Cameron [Mon, 12 Mar 2018 04:24:04 +0000 (17:24 +1300)]
Squash the various 'reorder imports' option into one

cc #2185

6 years agoResolve review comments
Seiichi Uchida [Tue, 10 Apr 2018 03:36:41 +0000 (12:36 +0900)]
Resolve review comments

6 years agoSimplify UseTree::has_comment
Seiichi Uchida [Fri, 6 Apr 2018 14:03:11 +0000 (23:03 +0900)]
Simplify UseTree::has_comment

6 years agoMerge imports with the same prefix into a single nested import
Seiichi Uchida [Fri, 6 Apr 2018 13:35:04 +0000 (22:35 +0900)]
Merge imports with the same prefix into a single nested import

6 years agoAdd merge_imports config option
Seiichi Uchida [Fri, 6 Apr 2018 13:34:41 +0000 (22:34 +0900)]
Add merge_imports config option

6 years agoAdd tests for merge_imports config option
Seiichi Uchida [Fri, 6 Apr 2018 13:32:30 +0000 (22:32 +0900)]
Add tests for merge_imports config option

6 years agoMerge pull request #2612 from peterhuene/suppress-unstable-config-options
Nick Cameron [Tue, 10 Apr 2018 03:07:57 +0000 (15:07 +1200)]
Merge pull request #2612 from peterhuene/suppress-unstable-config-options

Suppress unstable config options by default.

6 years agoMerge pull request #2613 from dwijnand/patch-1
Nick Cameron [Tue, 10 Apr 2018 02:15:26 +0000 (14:15 +1200)]
Merge pull request #2613 from dwijnand/patch-1

specify nightly required to install from source

6 years agospecify nightly required to install from source
Dale Wijnand [Mon, 9 Apr 2018 21:54:17 +0000 (22:54 +0100)]
specify nightly required to install from source

when using stable cargo install fails due to #![feature] usage:

    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:24:1
       |
    24 | #![feature(rustc_private, box_syntax)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:25:1
       |
    25 | #![feature(core_intrinsics)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:26:1
       |
    26 | #![feature(i128_type)]
       | ^^^^^^^^^^^^^^^^^^^^^^

    error[E0554]: #![feature] may not be used on the stable release channel
      --> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:27:1
       |
    27 | #![feature(specialization)]
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

    error: aborting due to 4 previous errors

    error: Could not compile `rustc-ap-serialize`.
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `rustfmt-nightly v0.4.1 (file:///d/rustfmt)`, intermediate artifacts can be found at `/d/rustfmt/target`

6 years agoSuppress unstable config options by default.
Peter Huene [Mon, 9 Apr 2018 07:43:17 +0000 (00:43 -0700)]
Suppress unstable config options by default.

This commit suppresses the output of unstable config options by default.

Users can specify the `--unstable-features` option to show the config options
that are unstable.

Fixes #2611.

6 years agoTry to fix a build regression before it happens
Nick Cameron [Mon, 9 Apr 2018 09:07:49 +0000 (21:07 +1200)]
Try to fix a build regression before it happens

6 years agoMake `error_on_line_overflow` false by default
Nick Cameron [Mon, 9 Apr 2018 04:47:55 +0000 (16:47 +1200)]
Make `error_on_line_overflow` false by default

And improve docs, the error message, etc.

I think false is the better default since such errors should only occur due to a bug in Rustfmt and therefore most users should not be notified of it happening (although to be clear, it might be a 'bug' which only occurs with pathological input and therefore we won't fix it). The error has proven to be confusing and annoying in the past.

Closes #1080

6 years agoReorder config options
Nick Cameron [Mon, 9 Apr 2018 04:31:53 +0000 (16:31 +1200)]
Reorder config options

cc #1974

6 years agoFix test
Nick Cameron [Sun, 8 Apr 2018 21:54:07 +0000 (09:54 +1200)]
Fix test

6 years agoMerge pull request #2609 from csmoe/update_rustc_syntax
Nick Cameron [Sun, 8 Apr 2018 21:49:39 +0000 (09:49 +1200)]
Merge pull request #2609 from csmoe/update_rustc_syntax

update rustc_ap_syntax

6 years agoupdate rustc syntax 91.0.0
csmoe [Sun, 8 Apr 2018 14:18:18 +0000 (22:18 +0800)]
update rustc syntax 91.0.0

6 years agoCargo update (#2602)
Seiichi Uchida [Fri, 6 Apr 2018 14:09:45 +0000 (23:09 +0900)]
Cargo update (#2602)

Update `rustc-ap-syntax` to 89.0.0 and fix up breaking changes.

6 years agoMerge pull request #2601 from topecongiro/fix-merge-mess
Nick Cameron [Fri, 6 Apr 2018 03:32:05 +0000 (15:32 +1200)]
Merge pull request #2601 from topecongiro/fix-merge-mess

Fix up merge mess

6 years agoFix up merge mess
Seiichi Uchida [Fri, 6 Apr 2018 01:31:57 +0000 (10:31 +0900)]
Fix up merge mess

6 years agoMerge pull request #2600 from i1skn/error_on_unformatted
Nick Cameron [Fri, 6 Apr 2018 00:41:13 +0000 (12:41 +1200)]
Merge pull request #2600 from i1skn/error_on_unformatted

Fix error_on_unformatted and skip_children override

6 years agoMerge pull request #2599 from topecongiro/issue-2596
Nick Cameron [Thu, 5 Apr 2018 23:12:53 +0000 (11:12 +1200)]
Merge pull request #2599 from topecongiro/issue-2596

Use multiple lines for imports list which exceeds max width

6 years agoMerge pull request #2593 from topecongiro/issue-2455
Nick Cameron [Thu, 5 Apr 2018 23:12:11 +0000 (11:12 +1200)]
Merge pull request #2593 from topecongiro/issue-2455

Add reorder_impl_items config option

6 years agoFix error_on_unformatted and skip_children override
Ivan Sorokin [Sat, 31 Mar 2018 12:27:39 +0000 (14:27 +0200)]
Fix error_on_unformatted and skip_children override

Currently, error_on_unformatted and skip_children options
specified in the config file are discarded.
This happens because CLI options have a higher priority,
but we coerce an absence of a `bool` option to `false`.
In this scenario, an absence of a `bool` option is indistinguishable
from explicetely set as `false`. We should coerce it to `None` instead,
so it does not override the one in the config file.

6 years agoMerge pull request #2576 from topecongiro/merge-imports
Nick Cameron [Thu, 5 Apr 2018 05:39:22 +0000 (17:39 +1200)]
Merge pull request #2576 from topecongiro/merge-imports

Use normalized form to format use items

6 years agoMerge pull request #2589 from topecongiro/issue-2588
Nick Cameron [Thu, 5 Apr 2018 05:36:15 +0000 (17:36 +1200)]
Merge pull request #2589 from topecongiro/issue-2588

Do not indent or unindent inside string literal

6 years agoMerge pull request #2581 from sinkuu/build_script
Nick Cameron [Thu, 5 Apr 2018 05:35:52 +0000 (17:35 +1200)]
Merge pull request #2581 from sinkuu/build_script

Rerun build.rs only when .git/HEAD or CFG_RELEASE_CHANNEL is changed

6 years agoMerge pull request #2580 from remram44/improve-where_single_line-help
Nick Cameron [Thu, 5 Apr 2018 05:34:53 +0000 (17:34 +1200)]
Merge pull request #2580 from remram44/improve-where_single_line-help

Improve `where_single_line` help

6 years agoAdd trailing comma when using mixed layout with block indent
Seiichi Uchida [Thu, 5 Apr 2018 04:27:42 +0000 (13:27 +0900)]
Add trailing comma when using mixed layout with block indent

6 years agoPut imports list on the next line if it exceeds max width
Seiichi Uchida [Thu, 5 Apr 2018 04:24:18 +0000 (13:24 +0900)]
Put imports list on the next line if it exceeds max width

6 years agoAdd a test for #2569
Seiichi Uchida [Thu, 5 Apr 2018 04:23:48 +0000 (13:23 +0900)]
Add a test for #2569

6 years agoDo not indent or unindent inside string literal
Seiichi Uchida [Mon, 2 Apr 2018 14:10:37 +0000 (23:10 +0900)]
Do not indent or unindent inside string literal

Closes #2588.

6 years agoImplement LineClasses
Seiichi Uchida [Mon, 2 Apr 2018 13:53:16 +0000 (22:53 +0900)]
Implement LineClasses

6 years agoAdd tests for #2588
Seiichi Uchida [Mon, 2 Apr 2018 13:52:39 +0000 (22:52 +0900)]
Add tests for #2588