Commit Graph

3845 Commits

Author SHA1 Message Date
Nick Cameron
b3cf8c1474
Merge pull request #2856 from snsmac/patch-1
Update Readme.md
2018-07-23 08:29:08 +12:00
jr
9c6a53053b
Update Readme.md
Use "rustfmt --print-config default rustfmt.toml" instead of "rustfmt --dump-default-config rustfmt.toml" to create default config
2018-07-22 13:00:33 +02:00
Nick Cameron
bcb64fdab8
Merge pull request #2853 from nrc/match-comment
Handle missing comments in match arm and more generally
2018-07-20 22:20:35 +12:00
Nick Cameron
b3aa671d71 Allow futures integration test to fail 2018-07-20 22:19:08 +12:00
Nick Cameron
d7bc9b50da
Merge pull request #2854 from topecongiro/rustc-ap-syntax
Update rustc-ap-*
2018-07-20 22:18:03 +12:00
Seiichi Uchida
d40ed146a5 Fix breaking changes
cc https://github.com/rust-lang/rust/pull/51829.
2018-07-20 16:18:45 +09:00
Seiichi Uchida
52f9f7bbe2 Cargo update 2018-07-20 16:05:18 +09:00
Nick Cameron
b085113cbe Trigger an internal error if we skip formatting due to a lost comment 2018-07-20 16:05:19 +12:00
Nick Cameron
6899471497 Check for comments after the => in a match arm
Closes #2188
2018-07-20 16:05:18 +12:00
Nick Cameron
aa61bd5c1a Update integration tests 2018-07-18 13:02:23 +12:00
Nick Cameron
90c5792565 Set rustfmt-format_macro_matchers to false by default
cc #2543
2018-07-18 12:09:50 +12:00
Nick Cameron
79c5ee8b42 Add config options for formatting macro matchers and bodies
Closes #2753
2018-07-18 12:03:59 +12:00
Nick Cameron
b27d544478 replace_with_system_newlines doesn't need to be public 2018-07-18 09:16:51 +12:00
Nick Cameron
1b0efd99e6
Merge pull request #2847 from mbebenita/max-width
Add max_width option for all heuristics.
2018-07-18 09:06:26 +12:00
Michael Bebenita
c2ae39e77a Add max_width option for all heuristics.
This is useful when working with very small max_widths like 79 chars.
2018-07-17 13:17:36 -04:00
Nick Cameron
b28a0cd6e6 Fix an anomaly with comments and array literals
Closes #2842
2018-07-17 15:40:19 +12:00
Nick Cameron
9038da6df0
Merge pull request #2790 from DevOrc/master
add emit flag documentation
2018-07-17 11:21:00 +12:00
Nick Cameron
d911b640d1
Merge pull request #2823 from fwalch/default-newline-style
Change default newline style to "Native"
2018-07-17 11:18:10 +12:00
Nick Cameron
ca57ff5b76 Fix Configurations.md
Correct default for `imports_indent`

Closes #2839
2018-07-17 10:45:30 +12:00
Seiichi Uchida
48c3e46cf1
Merge pull request #2829 from scampi/issue1210
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting
2018-07-16 16:07:05 +09:00
Stéphane Campinas
86018133a0
removed unused max_width argument of rewrite_string function 2018-07-14 19:33:26 +02:00
Stéphane Campinas
472a2ed0f6
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting 2018-07-14 19:22:31 +02:00
Seiichi Uchida
e110d95f53 0.8.3 2018-07-14 22:18:12 +09:00
Seiichi Uchida
12775ed978
Cargo update (#2845) 2018-07-14 22:16:23 +09:00
Seiichi Uchida
ddbfefef00
Merge pull request #2826 from nrc/complex-struct
Improve formatting of lists of binops
2018-07-14 20:28:38 +09:00
Nick Cameron
667ad76bca Add a link to ag_dubs' CI blog post to the README 2018-07-12 22:28:55 +12:00
Nick Cameron
229a55248b address reviewer comments 2018-07-12 22:21:07 +12:00
Nick Cameron
7a76e5b1b4 Add test for #2802 2018-07-12 21:37:28 +12:00
Nick Cameron
486f8fd8e7 Fixup formatting of tests and source 2018-07-12 21:37:28 +12:00
Nick Cameron
a4cdb68925 Improve formatting of series of binop expressions
This commit changes the handling of binops (and potentially other pairs), where
the expressions are logically a list, e.g., `a + b + c`. It makes the single
line vs multi-line approaches explicit and introduces a lowering step.

This improves formatting in a number of places, mostly improving consistency of
formatting with very short sub-expressions, but also some weird indentation.

Closes #2802
2018-07-12 21:37:28 +12:00
Nick Cameron
b68fd9e6bf Move pair handling to its own module 2018-07-12 21:37:28 +12:00
Nick Cameron
b6ea973d19 Factor out PairParts::infix 2018-07-12 21:37:28 +12:00
Nick Cameron
fba6b68bf2
Merge pull request #2836 from topecongiro/async-closure
Format async closure
2018-07-10 08:34:04 +12:00
Seiichi Uchida
60ce411b53 Format async closure 2018-07-09 23:20:53 +09:00
Seiichi Uchida
ae2c6a6692 Add a configuration guide for edition 2018-07-09 23:20:38 +09:00
Seiichi Uchida
25f83b14c7 Add a test for async closures 2018-07-09 23:20:30 +09:00
Seiichi Uchida
276a768eb2 Cargo update
Add `rustc-ap-syntax_pos` to dependencies.
2018-07-09 23:09:14 +09:00
Seiichi Uchida
4bfd47caac
Merge pull request #2828 from Dentosal/patch-1
Add missing equals sign to example configuration
2018-07-07 08:32:42 +09:00
Hannes Karppila
3562e643cf
Add missing equals sign to example configuration 2018-07-07 00:38:32 +03:00
Nick Cameron
97c8c0d6c1
Merge pull request #2827 from ehuss/help-doc
Fix help for --help=file-lines
2018-07-06 20:56:29 +12:00
Eric Huss
800e488de8 Fix help for --help=file-lines
Due to the way getopts works, it requires the equals sign.
2018-07-05 22:50:23 -07:00
Florian Walch
363363d066 test: Assert CRLF line endings on Windows 2018-07-02 23:43:59 +02:00
Florian Walch
9d8f3812cc Change default newline style to "Native"
Fixes #2626.
2018-07-02 23:16:17 +02:00
Nick Cameron
5e5992517d Update rustc-ap-syntax 2018-07-02 09:34:55 +12:00
Nick Cameron
f578e4f0c1 Update rustc-ap-syntax to 181 2018-07-02 08:45:09 +12:00
Nick Cameron
d5cb93216b
Merge pull request #2822 from topecongiro/issue-2782
Avoid panicking on deeply nested expressions
2018-07-01 14:38:30 +12:00
Nick Cameron
41398047bc
Merge pull request #2821 from topecongiro/issue-2721
Return the trimmed original snippet when formatting macro def failed
2018-07-01 14:37:30 +12:00
topecongiro
ebb1626264 Flatten multiple empty blocks at once 2018-07-01 10:51:36 +09:00
topecongiro
54af8b578e Factor out block_can_be_flattened 2018-07-01 10:49:05 +09:00
topecongiro
e7c6c29562 Avoid panicking on deeply nested expressions 2018-07-01 10:46:32 +09:00