Commit Graph

3303 Commits

Author SHA1 Message Date
Nick Cameron
1c17dbbf74 rebasing 2018-04-11 10:46:49 +12:00
Nick Cameron
aa4419019a Update tests 2018-04-11 10:46:49 +12:00
Nick Cameron
911395a451 Squash the various 'reorder imports' option into one
cc #2185
2018-04-11 10:46:49 +12:00
Nick Cameron
518ece2272
Merge pull request #2612 from peterhuene/suppress-unstable-config-options
Suppress unstable config options by default.
2018-04-10 15:07:57 +12:00
Nick Cameron
2840229d6f
Merge pull request #2613 from dwijnand/patch-1
specify nightly required to install from source
2018-04-10 14:15:26 +12:00
Dale Wijnand
8331197b7b
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`
2018-04-09 22:54:17 +01:00
Peter Huene
8208f8aa01
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.
2018-04-09 12:45:56 -07:00
Nick Cameron
e784712f09 Try to fix a build regression before it happens 2018-04-09 21:07:49 +12:00
Nick Cameron
f14671131e 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
2018-04-09 16:47:55 +12:00
Nick Cameron
48e5bc1988 Reorder config options
cc #1974
2018-04-09 16:31:53 +12:00
Nick Cameron
7822d0c921 Fix test 2018-04-09 09:54:07 +12:00
Nick Cameron
45629dbdd6
Merge pull request #2609 from csmoe/update_rustc_syntax
update rustc_ap_syntax
2018-04-09 09:49:39 +12:00
csmoe
84d3659767 update rustc syntax 91.0.0 2018-04-08 22:22:11 +08:00
Seiichi Uchida
edcc7b69eb
Cargo update (#2602)
Update `rustc-ap-syntax` to 89.0.0 and fix up breaking changes.
2018-04-06 23:09:45 +09:00
Nick Cameron
b6645e345e
Merge pull request #2601 from topecongiro/fix-merge-mess
Fix up merge mess
2018-04-06 15:32:05 +12:00
Seiichi Uchida
04227a7d30 Fix up merge mess 2018-04-06 10:31:57 +09:00
Nick Cameron
0a480181e8
Merge pull request #2600 from i1skn/error_on_unformatted
Fix error_on_unformatted and skip_children override
2018-04-06 12:41:13 +12:00
Nick Cameron
4b2160e1b2
Merge pull request #2599 from topecongiro/issue-2596
Use multiple lines for imports list which exceeds max width
2018-04-06 11:12:53 +12:00
Nick Cameron
a3fba04141
Merge pull request #2593 from topecongiro/issue-2455
Add reorder_impl_items config option
2018-04-06 11:12:11 +12:00
Ivan Sorokin
3fe2233fd3 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.
2018-04-05 23:13:17 +02:00
Nick Cameron
b7ba6f70b1
Merge pull request #2576 from topecongiro/merge-imports
Use normalized form to format use items
2018-04-05 17:39:22 +12:00
Nick Cameron
0156fe07ac
Merge pull request #2589 from topecongiro/issue-2588
Do not indent or unindent inside string literal
2018-04-05 17:36:15 +12:00
Nick Cameron
4237f40c50
Merge pull request #2581 from sinkuu/build_script
Rerun build.rs only when .git/HEAD or CFG_RELEASE_CHANNEL is changed
2018-04-05 17:35:52 +12:00
Nick Cameron
a318bc887f
Merge pull request #2580 from remram44/improve-where_single_line-help
Improve `where_single_line` help
2018-04-05 17:34:53 +12:00
Seiichi Uchida
97ec417e74 Add trailing comma when using mixed layout with block indent 2018-04-05 13:27:42 +09:00
Seiichi Uchida
636de8313d Put imports list on the next line if it exceeds max width 2018-04-05 13:24:18 +09:00
Seiichi Uchida
8f615af44e Add a test for #2569 2018-04-05 13:23:48 +09:00
Seiichi Uchida
ec1907b2a4 Do not indent or unindent inside string literal
Closes #2588.
2018-04-05 12:52:43 +09:00
Seiichi Uchida
89070a2244 Implement LineClasses 2018-04-05 12:52:43 +09:00
Seiichi Uchida
a43ac40a78 Add tests for #2588 2018-04-05 12:52:43 +09:00
Seiichi Uchida
fa80ddf876 Reorder impl items based on its kind
The ordering is defined as follows:

type < cosnt < macro < method

Items that are same kind will not be reordered: that is, the item
that an user has put first comes first.
2018-04-05 12:49:16 +09:00
Seiichi Uchida
94f5a05a6a Add reorder_impl_items config option 2018-04-05 12:49:16 +09:00
memoryleak47
d48cbedfe4 typo (#2598)
* typo

* more typos
2018-04-05 12:47:09 +09:00
Ryan Leung
2c7e737a06 add tests for macro!(/* comment */) (#2592)
* add tests
2018-04-04 11:02:01 +09:00
Russell Cohen
2e7d1a1184 Include instructions to install on nightly (#2590) 2018-04-03 11:10:50 +09:00
Marthog
bc05621f9b Let --dump-default-config default to stdout #2579 (#2586) 2018-04-01 23:15:25 +09:00
Seiichi Uchida
dec307b2fa
Merge pull request #2584 from sinkuu/cleanup
Misc cleanups
2018-04-01 23:14:52 +09:00
Shotaro Yamada
e2d801f11e Do not turn spaces in the beginning of the file into a newline (#2583) 2018-04-01 23:09:53 +09:00
Shotaro Yamada
56e10aa6e9 Fix typo 2018-04-01 22:29:26 +09:00
Shotaro Yamada
3467b4dafe Use ListItem::has_comment 2018-04-01 22:29:26 +09:00
Shotaro Yamada
ba792a7fa2 Remove redudant parens 2018-04-01 22:29:26 +09:00
Shotaro Yamada
71448ff3c2 Return String instead of always returing Cow::Owned 2018-04-01 22:29:26 +09:00
Shotaro Yamada
39e85281f3 Remove stray comment
Its pointee was removed in 04a6d16c7b
2018-04-01 22:29:26 +09:00
Shotaro Yamada
a2325375ed Do not collect into a Vec by hand 2018-04-01 22:29:26 +09:00
Shotaro Yamada
89200f40ff Remove unnecessary [..]s 2018-04-01 22:29:26 +09:00
Shotaro Yamada
6b3811a358 Use Iterator methods 2018-04-01 22:29:26 +09:00
Shotaro Yamada
ed46a777c8 Use str::repeat 2018-04-01 22:29:26 +09:00
Shotaro Yamada
1d3bc68496 Rerun build.rs only when .git/HEAD or CFG_RELEASE_CHANNEL is changed 2018-04-01 16:48:59 +09:00
Remi Rampin
37ee9c20aa Improve where_single_line help 2018-03-31 18:51:41 -04:00
Ivan Sorokin
e6423cf4b1 Add test #2574 (#2577) 2018-04-01 00:54:44 +09:00