Commit Graph

3342 Commits

Author SHA1 Message Date
Nick Cameron
2a71bef0b0 0.3.7 2018-02-01 19:25:48 +13:00
Nick Cameron
0294a79b5b
Merge pull request #2384 from topecongiro/init-shorthand
Use field initialization shorthand if possible
2018-02-01 15:20:11 +13:00
Nick Cameron
b7f01769f9
Merge branch 'master' into init-shorthand 2018-02-01 15:20:01 +13:00
Nick Cameron
918e79bb5a
Merge pull request #2380 from topecongiro/reorder-mods
[RFC] Reorder modules alphabetically
2018-02-01 15:18:34 +13:00
Seiichi Uchida
2fb6bd3b9f
Merge pull request #2400 from csmoe/support_immovable_generators
Support immovable generators
2018-01-31 13:13:05 +09:00
csmoe
28bb16a5a0 add a support for immovable generators 2018-01-30 22:14:33 +08:00
Seiichi Uchida
c9c346a89f Add 'use_field_init_shorthand' config option 2018-01-29 22:15:20 +09:00
Seiichi Uchida
4c9ab8b405 Cargo fmt with modules reordering enabled 2018-01-29 22:00:07 +09:00
Seiichi Uchida
56c6d73d82 Reorder modules
Add `reorder_modules` config option.

Two things we must keep in mind when reordering modules:
1. We should not reorder modules with attributes, as doing so could
   potentially break the code (e.g. `#[macro_use]`).
2. We should not reorder inline modules e.g. `mod foo { /* .. */ }`.
   We should only reorder module declarations e.g. `mod foo;`.

Some open questions:
1. Should we bring modules with `pub` in front of those without `pub`
   so that they stand out from others?
2. Instead of keeping modules with attributes in the same place,
   can we bring them in front of others? Is this safe?
2018-01-29 21:59:15 +09:00
Seiichi Uchida
7d63490d85 Update to the latest libsyntax changes 2018-01-29 21:44:26 +09:00
Seiichi Uchida
5977f516b1 Cargo update 2018-01-29 21:43:44 +09:00
Nick Cameron
ba3dec2379
Merge pull request #2395 from davidalber/fix-configuration-snippets2
Fixing straightforward configuration snippets (Part 2)
2018-01-29 13:51:16 +11:00
Nick Cameron
4633786848
Merge pull request #2396 from topecongiro/issue-2389
Put attributes and enum variants on different lines
2018-01-29 10:36:26 +11:00
Seiichi Uchida
c60d865b98 Put attributes and enum variants on different lines 2018-01-26 16:20:00 +09:00
Seiichi Uchida
dfc67a5df7 Cargo clippy 2018-01-26 14:53:28 +09:00
David Alber
476ec77fa3 Wrapping match_arm_blocks=false snippet in function 2018-01-25 21:05:19 -08:00
David Alber
42efa7cc2f Wrapping match_arm_blocks=true snippet in function 2018-01-25 21:05:19 -08:00
David Alber
d27393528c Fixing use_try_shorthand=true snippet 2018-01-25 21:05:19 -08:00
David Alber
90c3ea716a Fixing use_try_shorthand=false snippet 2018-01-25 21:05:19 -08:00
David Alber
4315e3d968 Fixing type_punctuation_density=Compressed snippet 2018-01-25 21:05:19 -08:00
David Alber
dab8f4991d Fixing type_punctuation_density=Wide snippet 2018-01-25 21:05:19 -08:00
David Alber
61630bc6f5 Wrapping trailing_comma=Never snippet in function 2018-01-25 21:05:19 -08:00
David Alber
6c92808060 Wrapping trailing_comma=Always snippet in function 2018-01-25 21:05:19 -08:00
David Alber
99ae6b8d1f Wrapping trailing_comma=Vertical snippet in function 2018-01-25 21:05:19 -08:00
David Alber
9d696a94e6 Fixing tab_spaces=2 snippet 2018-01-25 21:05:19 -08:00
David Alber
e5cdf0e9fd Fixing tab_spaces=4 snippet 2018-01-25 21:05:19 -08:00
David Alber
fdd126a36e Wrapping struct_lit_single_line=false snippet in function 2018-01-25 21:05:19 -08:00
David Alber
33b5c3f9d5 Fixing spaces_within_parens_and_brackets=true snippet 2018-01-25 21:05:19 -08:00
David Alber
9a9bb8564b Fixing spaces_within_parens_and_brackets=false snippet 2018-01-25 21:05:19 -08:00
David Alber
8d0497bf83 Fixing force_multiline_blocks=true snippet 2018-01-25 21:02:18 -08:00
David Alber
f624f6b5a6 Fixing force_multiline_blocks=false snippet 2018-01-25 21:02:18 -08:00
Seiichi Uchida
f925c581fe
Merge pull request #2386 from acmcarther/master
Make rustfmt-bin's CARGO_PKG_VERSION envvar optional
2018-01-26 12:35:52 +09:00
Seiichi Uchida
a19e1c0b83
Merge pull request #2369 from davidalber/fix-configuration-snippets
Fixing straightforward configuration snippets (Part 1)
2018-01-26 12:35:04 +09:00
Seiichi Uchida
dfae6a99c0
Merge pull request #2383 from davidalber/range-spaces-in-match
Extending `spaces_around_ranges` to ranges in match arm patterns
2018-01-26 12:32:28 +09:00
Alex McArther
6d294e6bcb Make rustfmt-bin's CARGO_PKG_VERSION envvar optional 2018-01-23 07:55:50 -08:00
Seiichi Uchida
154bf8e1af Cargo fmt 2018-01-22 13:05:18 +09:00
Seiichi Uchida
fa6892eb63 Use field initialization shorthand if possible
Also this PR fixes a bug that attributes on a shorthand field get removed.
2018-01-22 13:04:20 +09:00
Seiichi Uchida
fff59fe8d9 Add a test for field initialization shorthand 2018-01-22 13:03:48 +09:00
David Alber
69f27673df Extending spaces_around_ranges to ranges in match arm patterns 2018-01-21 16:50:17 -08:00
Seiichi Uchida
8e6ee4a762
Merge pull request #2341 from rust-lang-nursery/steveklabnik-patch-1
Fix installation instructions to use rustup
2018-01-21 15:26:31 +09:00
Seiichi Uchida
6b19d4d749
Merge pull request #2378 from kjvalencik/hard-tabs-overflow
LineOverflow: Count tabs as tab_spaces when measuring line length for overflow
2018-01-21 15:20:33 +09:00
Chris Emerson
6f669091e0 Fix typo in comment. 2018-01-20 20:46:30 +00:00
Chris Emerson
7213b88ba1 Return a struct instead of a 4-tuple from get_modified_lines(). 2018-01-20 20:45:06 +00:00
Chris Emerson
fc377f3fb0 Add a new get_modified_lines() API to get only the new
changed lines from rustfmting.

Squashed commit of the following:

commit e90f9da64bbdb640b8c9ee61c3ad395617d8b4da
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Sat Jan 20 20:10:16 2018 +0000

    Fix tests after merging with master.

commit c3af0042769fe459b0c9c94a0934605ea4b40e40
Merge: 03868583 e0e3e222
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Sat Jan 20 17:45:05 2018 +0000

    Merge remote-tracking branch 'origin/master' into HEAD

commit 03868583f8555aae30bdfb5839a82afd3704f4cb
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:57:56 2017 +0000

    Fix some warnings.

commit 162b13463e44c782394d418db5ca5710931beb7a
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:48:02 2017 +0000

    Remove unneeded import.

commit 20cce3cbfd0f386d92b80bf4c7b83ab4d78a73e7
Merge: 81e98147 fa794f58
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:07:17 2017 +0000

    Merge branch 'master' into difflines_mode

commit 81e981472ceb3a0938d6f050edf8dcd5ebff8e33
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Mon Nov 20 01:02:50 2017 +0000

    Add a simple "modified lines" test.

commit 018390ced3523ca9fdd5384a6c1004cdb99174a9
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 23:06:21 2017 +0000

    Update test output.

commit 7909f4986ed21999aff7b3d075332e686ac464ff
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 23:03:22 2017 +0000

    Rerun rustfmt.

commit 6275f1a8da52db1df36c4b7432996cdbb94ca463
Merge: 7a66d286 175c0c6f
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 21:40:29 2017 +0000

    Merge remote-tracking branch 'origin/master' into difflines_mode

commit 7a66d2866432c430b046938bb37bf5efc03fa9da
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Thu Nov 2 21:36:40 2017 +0000

    WIP: Add a separate API to get changed lines.
    Currently calls format_input() and adjusts the output.

commit c8163a923c7d9ae42fd8078cd9b2b51c6f73e36e
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 27 22:53:33 2017 +0100

    Remove "modified" from the documentation again.

commit 94041fa115a6f428afe40e01d41bf2fe603f70bb
Merge: acaa3c7c 2adf7eec
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 27 22:47:05 2017 +0100

    Merge branch 'master' into difflines_mode

commit acaa3c7ce446297cd3fe5c9610763629a2d8537c
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 23:34:14 2017 +0100

    Update the Modified write mode to use `out` instead of just prinln!().

    This means we can test it more easily, so do so.

commit 9f1bbca1f3c12d933ea823918cc548e69b438b1e
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 23:11:55 2017 +0100

    Add "Modified" to the various lists of modes.

commit e12f023756cf3daf202dcaa02bd6492b0d2a0455
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:57:33 2017 +0100

    Rerun cargo fmt.

commit 0f8a43630fa1548e95dcb1c0933708f9c11ae135
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:46:26 2017 +0100

    Add `line_number_orig` to instances of `Mismatch` in tests.

commit d432a7061f74dbc159584f08470c64985a4b41d9
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:41:40 2017 +0100

    Add a `line_number_orig` field to `Mismatch` to track the pre-format line number.
    Use that for the write-mode=modified output.

commit bdb7d1d23f02f7b8f18e7073a65be88ff94cdbb3
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 22:35:50 2017 +0100

    First basic --write-mode=modified implementation.

commit ea1433dae0c32879a31182c11be08b1bf53fbf31
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Fri Oct 20 00:04:16 2017 +0100

    WIP on new "modified" mode.

commit 27ee9483cf937a11a0e115f54de0afcc3f9ceb44
Merge: e48dd81a 2a84352d
Author: Chris Emerson <github@mail.nosreme.org>
Date:   Tue Oct 24 21:56:44 2017 +0100

    Merge remote-tracking branch 'jc/diff_zero_context' into difflines_mode
2018-01-20 20:23:25 +00:00
K.J. Valencik
1fb172f989 LineOverflow: Count tabs as tab_spaces when measuring line length for overflow 2018-01-19 12:18:25 -05:00
Seiichi Uchida
e0e3e22248 0.3.6 2018-01-18 18:56:46 +09:00
Nick Cameron
30ba763c77
Merge pull request #2371 from topecongiro/issue-2370
Do not panic when special macros have less args than expected
2018-01-18 15:19:41 +13:00
Seiichi Uchida
298f29a57d Do not panic when special macros have less args than expected 2018-01-18 00:50:16 +09:00
David Alber
2afd1eada3 Wrapping match_block_trailing_comma=true snippet in function 2018-01-16 08:12:32 -08:00
David Alber
44d2fcc2a0 Wrapping match_block_trailing_comma=false snippet in function 2018-01-16 08:12:32 -08:00