topecongiro
921e0c22ab
Factor out FnSig::to_str()
2017-09-29 15:09:13 +09:00
topecongiro
62e38860b9
Handle 'extern "Rust"' in format_abi()
2017-09-29 15:08:48 +09:00
topecongiro
9537437e52
Use is_empty_block()
2017-09-29 12:51:06 +09:00
topecongiro
d8fc9ec05e
Remove has_braces from argument
2017-09-29 12:50:35 +09:00
topecongiro
2e6825cc8c
Use FnSig in rewrite_fn() and rewrite_fn_base()
2017-09-29 12:49:39 +09:00
topecongiro
7d448c2b26
Implement FnSig type
2017-09-29 12:45:42 +09:00
topecongiro
ee2b3b1529
Put the opening brace of fn body on the next line if it exceeds max width
2017-09-28 20:12:04 +09:00
topecongiro
436a083fce
Change return type of rewrite_call_inner() to Option<String>
2017-09-28 16:33:30 +09:00
topecongiro
dd0dcdf1ac
Fix a budget bug in Arg::rewrite()
2017-09-26 11:20:47 +09:00
topecongiro
b751030640
Remove unnecessary wrap_str()
2017-09-19 11:40:20 +09:00
Seiichi Uchida
32fa51a6a9
Move Spanned to spanned.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
df7d2be562
Move Indent and Shape to shape.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
18cd19673d
Remove wrap_str() from recover_comment_removed()
...
since we will be using the original snippet no matter what.
2017-09-18 23:30:59 +09:00
Nick Cameron
cccb7f681e
Merge pull request #1966 from topecongiro/string-to-cow
...
Refactoring: use Cow and etc.
2017-09-18 12:45:25 +12:00
topecongiro
0b5d524486
Remove unnecessary references
2017-09-15 17:09:30 +09:00
topecongiro
f51261e93e
Cargo fmt
2017-09-15 12:10:58 +09:00
Seiichi Uchida
e6e696f7b0
Avoid cloning String
2017-09-05 01:04:08 +09:00
Nick Cameron
d08405eed6
Merge pull request #1931 from topecongiro/cargo-clippy
...
Apply refactoring from cargo clippy
2017-08-31 17:18:45 +12:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
topecongiro
4ad81d0bd9
Refactoring: use context.budget()
2017-08-31 12:44:40 +09:00
topecongiro
16894b9cd2
Put the closing brace of empty enum on the same line with the opening brace
2017-08-31 12:44:40 +09:00
Nick Cameron
39a91ba292
Fixup warnings and test formatting
2017-08-31 14:20:47 +12:00
Vadim Petrochenkov
6e5c6f5ba3
Use getters to access Span
fields
2017-08-31 14:14:13 +12:00
topecongiro
979d131c5d
Format and preserve attributes on ast::Stmt
2017-08-30 19:27:36 +09:00
topecongiro
e31a48b4d9
Refactoring: remove duplicates
2017-08-30 19:26:45 +09:00
Nick Cameron
7298ce9d52
Merge pull request #1925 from topecongiro/enhance-comment
...
Enhance comment formatting
2017-08-28 09:33:08 +12:00
topecongiro
1015dd8860
Use String::with_capacity() instead of String::new()
2017-08-28 00:24:10 +09:00
topecongiro
c4c55285da
Recover comments between 'trait' and the opening brace
2017-08-28 00:17:19 +09:00
topecongiro
fa7c4d5030
Recover comments between 'impl' and the opening brace
2017-08-28 00:16:54 +09:00
topecongiro
6bbc6b54de
Refactor - remove duplicates
...
replacing some functions with recover_missing_comments() and
rewrite_missing_comments().
2017-08-28 00:13:42 +09:00
topecongiro
ef84319e47
Fix a typo in calculating overhead for fn args
2017-08-27 14:57:21 +09:00
topecongiro
1f9e7c25c9
Implement Rewrite trait for ast::ForeignItem
2017-08-25 08:19:51 +09:00
Nick Cameron
7e171836c6
Merge pull request #1900 from spinda/attributes-on-same-line
...
Add attributes_on_same_line_as_{field,variant} configs
2017-08-21 11:26:36 +12:00
Nick Cameron
88cb142173
Merge pull request #1895 from topecongiro/configs-match_pattern_separator_break_point
...
Add mach_pattern_separator_break_point config option
2017-08-21 09:30:34 +12:00
Michael Smith
baafa4f011
Fix wrapping of bounds in associated types
...
Bounds were wrapped to the full width of the line rather then the width
available after the "type ...: ", resulting in rustfmt unnecessarily producing
lines that were longer than the maximum width.
2017-08-19 15:30:53 -07:00
Michael Smith
1c9d044c05
Add attributes_on_same_line_as_{field,variant}
2017-08-19 15:09:10 -07:00
Seiichi Uchida
63ac49638b
Support match_pattern_separator_break_point config option
2017-08-18 23:19:47 +09:00
topecongiro
a4e0fe2b02
Allow attributes to stay on the same line with fields
2017-08-11 17:52:49 +09:00
topecongiro
0bb998685d
Cover comments between function args and the brace
2017-08-10 23:11:18 +09:00
topecongiro
be38606c77
Add leave_last field to ListItems
2017-08-09 16:37:21 +09:00
Seiichi Uchida
a5a7cc7643
Insert newline between type alias with where clause
2017-08-02 23:27:33 +09:00
Seiichi Uchida
c0c27761b4
Simplify comments separator
2017-08-02 23:27:19 +09:00
Seiichi Uchida
d955497751
Factor out boolean flags for rewrite_where_clause()
2017-08-02 23:26:35 +09:00
Nick Cameron
9ae00a4498
Merge pull request #1847 from topecongiro/issue-1843
...
Implement single-line where
2017-08-02 14:28:48 +12:00
Seiichi Uchida
659d325982
Implement compressed where clause with Rfc style
2017-08-01 22:27:12 +09:00
Seiichi Uchida
ec6c2d6e99
Refactor compute_budgets_for_args()
2017-08-01 22:27:12 +09:00
Seiichi Uchida
c67f729205
Refactoring
2017-08-01 22:27:12 +09:00
topecongiro
e636fe732e
Use Span from ast::WhereClause
2017-08-01 18:36:36 +09:00
Nick Cameron
c283d3e643
Merge pull request #1840 from topecongiro/match-with-max-width
...
Match with max width
2017-08-01 13:51:23 +12:00
Seiichi Uchida
e588f2fd7b
Make definitive_tactic more generic via enum Separator
2017-07-31 16:23:42 +09:00
Seiichi Uchida
570a3505b9
Make definitive_tactic more generic with separator length
2017-07-29 22:13:23 +09:00
topecongiro
5aff5beb2a
More fine-grained file-lines
2017-07-29 16:11:36 +09:00
Nick Cameron
74f5a515ef
Merge pull request #1831 from topecongiro/trait-associated-type-with-default
...
Fix a typo in rewrite_associated_type
2017-07-29 12:31:36 +12:00
Nick Cameron
19bd5ea7b3
Merge pull request #1826 from topecongiro/issue-1824
...
Use correct BytePos for where when rewriting trait
2017-07-29 12:11:17 +12:00
topecongiro
462530cb7e
Fix a typo in rewrite_associated_type
2017-07-28 06:27:34 +09:00
topecongiro
5a81c7d4b0
Use correct BytePos for where when rewriting trait
2017-07-27 14:21:14 +09:00
topecongiro
c3cc8fcb13
Format defaultness
2017-07-27 09:43:35 +09:00
Nick Cameron
1f991d00e0
Merge pull request #1822 from topecongiro/issue-1172
...
Remove newlines between list elements for expressions
2017-07-27 11:15:53 +12:00
Seiichi Uchida
261865ecc9
Remove newlines between list elements for expressions
2017-07-26 22:43:36 +09:00
topecongiro
e523f053a3
Format source codes and update tests
2017-07-26 16:30:58 +09:00
Nick Cameron
8b5831b501
Merge pull request #1818 from topecongiro/issue-1194
...
Put braces on the next line if it exceeds max width
2017-07-26 11:40:41 +12:00
topecongiro
65ad7d3bb0
Put braces on the next line if it exceeds max width
2017-07-25 18:51:14 +09:00
topecongiro
a17993c14a
Force vertical layout when struct_variant_width is 0
2017-07-25 15:19:09 +09:00
Seiichi Uchida
8b970fcc9f
Format inner attributes wherever possible
2017-07-25 00:55:55 +09:00
topecongiro
68c6fe70fd
Format source codes and update tests
2017-07-21 17:57:31 +09:00
topecongiro
db5f77b7d0
Consider max_width when rewriting struct in single-line
2017-07-21 07:17:49 +09:00
Seiichi Uchida
a8b0a6e4c5
Format source codes and update tests
2017-07-20 00:42:00 +09:00
Seiichi Uchida
de403f4f65
Use offset_left instead of shrink_left
2017-07-20 00:41:36 +09:00
topecongiro
dcb953b901
Add trailing comma when using Mixed indent style with newline
2017-07-13 20:32:46 +09:00
topecongiro
6fd291981e
Sort imports in alphabetical and consistent order
2017-07-13 18:42:14 +09:00
topecongiro
2fb66cd1d3
Add trailing_semicolon config option
...
trailing_semicolon controls whether to add a trailing semicolon after break,
continue and return.
2017-07-12 14:16:06 +09:00
topecongiro
e3310a6a18
Format source codes
2017-07-11 21:53:10 +09:00
Seiichi Uchida
bc90a12b8d
Format union
2017-07-10 17:26:55 +09:00
topecongiro
65790f2b2a
Cover missing comments before and after where
2017-07-10 14:38:16 +09:00
Seiichi Uchida
bc63d69c3f
Format source codes
2017-07-10 02:24:59 +09:00
topecongiro
2dd8d6d097
Add Clone trait bound to write_list
2017-07-07 09:04:06 +09:00
Nick Cameron
cfec7ad593
Merge pull request #1745 from topecongiro/assignment
...
Put rhs of assignment on the next line if it fits in a single line
2017-07-07 11:54:06 +12:00
topecongiro
cb48435ff3
Format source codes
2017-07-05 18:31:37 +09:00
topecongiro
101df143cf
Refactor rewrite_static
2017-07-05 18:25:50 +09:00
topecongiro
6a7f866cfe
Format source codes
2017-07-05 18:12:43 +09:00
topecongiro
f8586bac2a
Handle comment at the last element in write_list
2017-07-05 18:01:34 +09:00
topecongiro
be5c40cbb9
Handle very long struct
2017-07-05 18:00:36 +09:00
topecongiro
332cc97986
Use block indent style for struct tuple
2017-07-05 18:00:36 +09:00
topecongiro
34b4a9d3c4
Add struct_field_align_threshold for vertical alignment
2017-07-03 18:54:41 +09:00
topecongiro
fb1225a8af
Use format_expr wherever single-lined block is not allowed
2017-06-20 22:35:16 +09:00
topecongiro
512c8c1edf
Apply config.trailing_comma wherever possible
2017-06-19 16:00:04 +09:00
topecongiro
91bd1fdc86
Format source codes
2017-06-18 14:29:17 +09:00
Nick Cameron
be18e7af90
Merge pull request #1717 from topecongiro/type-and-generics
...
Refactor format against types and generics
2017-06-18 15:57:34 +12:00
Seiichi Uchida
38c30a3e06
Refactor format against types and generics
...
Previous implementation relied on the fact that rustfmt used visual indent
style as a default. However, since now rustfmt uses block indent style against
most part of the code, we need some refactorings.
2017-06-18 02:00:58 +09:00
topecongiro
54233acc8e
Format source codes
2017-06-17 16:56:54 +09:00
topecongiro
e31f5eceac
Use correct span for Infer type inside closure header
2017-06-17 15:35:29 +09:00
topecongiro
b048fe6b35
Format source codes
2017-06-17 15:26:59 +09:00
topecongiro
208ff15954
Format source codes
2017-06-16 08:49:49 +09:00
topecongiro
8a6e9f689b
Format source codes
2017-06-15 16:26:41 +09:00
topecongiro
b8f11a4e3c
Format source codes
2017-06-14 20:39:07 +09:00
topecongiro
c06d487712
Add offset wherever necessary
2017-06-14 20:37:54 +09:00
topecongiro
c4d84b44ba
Avoid overflow
2017-06-14 00:06:48 +09:00
Nick Cameron
18ccd0190e
Rebasing
2017-06-13 14:49:47 +12:00
Nick Cameron
6f30d9e7c9
Reformat tests
2017-06-13 14:42:54 +12:00
Nick Cameron
1f512948a0
Reformat source code using new defaults
2017-06-13 14:41:49 +12:00
topecongiro
f084a8af96
Fix excessive indentation in trait where clause when using Rfc style
2017-06-13 10:18:55 +09:00
Nick Cameron
5d78d1fe00
Merge pull request #1655 from topecongiro/issue-1652
...
Use correct indent for return type when it goes multi line
2017-06-13 11:57:30 +12:00
Nick Cameron
c07925f498
Merge pull request #1647 from topecongiro/refactor-impl-format
...
Refactor impl format
2017-06-13 11:55:33 +12:00
topecongiro
d269189f19
Use correct indent for return type when it goes multi line
2017-06-12 16:23:10 +09:00
topecongiro
62e9473d07
Update rewrite_trait_ref to return Option<String>
2017-06-12 08:53:19 +09:00
topecongiro
f135641cc8
Use multi line when type bounds does not fit in a single line
2017-06-11 23:26:49 +09:00
topecongiro
9b195ae228
Refactor format_impl
2017-06-11 14:32:44 +09:00
topecongiro
bd80077be8
Add format_trait_ref_then_update_result
2017-06-10 21:07:38 +09:00
topecongiro
88e522f921
Use multiline in generics rather than fail
2017-06-10 19:45:23 +09:00
topecongiro
9eefc6fc8d
Share codes when rewriting generics
2017-06-10 18:31:01 +09:00
topecongiro
c92064c30a
Force brace on new line if the signature ends with comment
2017-06-09 16:15:31 +09:00
est31
727963afe4
Update syntex_syntax
...
Bases on commit to switch to libsyntax by @nrc
2017-06-06 07:31:47 +02:00
Nick Cameron
6a9d7dab0d
Merge pull request #1637 from est31/master
...
Add config options for spaces around the colon in struct literal fields
2017-06-06 16:20:16 +12:00
Nick Cameron
130aa70e3a
Merge pull request #1621 from topecongiro/combining
...
Combine more expressions
2017-06-06 14:52:48 +12:00
est31
aa4cd311bb
Add config options for spaces around the colon in struct literal fields
...
In Rust, colons are used for three purposes:
* Type annotations, including type ascription
* Trait bounds
* Struct literal fields
This commit adds options for the last missing of the three purposes,
struct literal fields.
2017-06-06 03:50:58 +02:00
Nick Cameron
d04ab9e5ba
Merge pull request #1630 from topecongiro/issue-1115
...
Allow comments after attributes on enum fields
2017-06-05 11:41:52 +12:00
topecongiro
d7de5b7656
Allow comments after attributes on enum fields
2017-06-04 23:27:21 +09:00
topecongiro
dcc7f32152
Format source codes
2017-06-04 19:37:24 +09:00
topecongiro
a9f529cba4
Format source codes
2017-06-04 19:35:29 +09:00
topecongiro
d54634bd7c
Use recover_comment_removed in rewrite_static
2017-06-04 18:44:08 +09:00
Nick Cameron
6f1cb950d6
Merge pull request #1628 from topecongiro/issue-1113
...
Preserve the layout of comment after return type
2017-06-04 11:40:37 +12:00
Nick Cameron
3090086000
Merge pull request #1627 from topecongiro/issue-1624
...
Refactor vertical layout of function definition with options
2017-06-04 11:34:25 +12:00
topecongiro
15e936bfc7
Preserve the layout of comment after return type
2017-06-04 06:59:55 +09:00
Seiichi Uchida
dd13761f85
Organize vertical layout of function definition
2017-06-03 23:18:39 +09:00
Seiichi Uchida
9b7ba980cf
Use correct budget
2017-06-03 23:17:30 +09:00
Seiichi Uchida
d21792a730
Put opening paren next to multi line generic
2017-06-03 23:16:29 +09:00
Seiichi Uchida
08b5375776
Forbid trailing comma at the end of args of variadic functions
2017-06-03 15:03:08 +09:00
Seiichi Uchida
4402412b78
Allow attributes in generics of impl
2017-05-27 23:59:29 +09:00
Nick Cameron
8ac3fc36cc
Merge pull request #1597 from topecongiro/comments-after-attributes
...
Allow comments after attributes of struct fields
2017-05-27 13:47:42 +12:00
Nick Cameron
aad250e20e
Merge pull request #1596 from topecongiro/issue-1595
...
Add a trailing comma if the last arg ends with comment
2017-05-27 13:38:14 +12:00
Nick Cameron
2dc4298b71
Merge pull request #1593 from topecongiro/issue-1439
...
Allow comments after where clause
2017-05-27 13:34:50 +12:00
Nick Cameron
4e5df80c03
Merge pull request #1588 from topecongiro/nesting-macro
...
Allow macro to be nested like function call
2017-05-27 13:28:47 +12:00
topecongiro
b6c503ac32
Allow comments after attributes of struct fields
2017-05-27 09:36:25 +09:00
topecongiro
67e8a690ff
Add a trailing comma if the last arg ends with comment
2017-05-27 07:33:06 +09:00
topecongiro
dab14b4485
Allow comments after where clause
2017-05-27 02:07:58 +09:00
topecongiro
554605d47c
Format source codes and add tests
2017-05-26 16:40:19 +09:00
topecongiro
0869bca85a
Put closing paren on the next line when the last arg contains comment
2017-05-26 13:15:10 +09:00
Nick Cameron
3d135ebba4
Merge pull request #1586 from topecongiro/minor
...
Fix minor bugs
2017-05-26 08:43:52 +12:00
Seiichi Uchida
10c7934700
Be precise with one_line_budget for fn_base
2017-05-25 22:55:11 +09:00
topecongiro
86856491bc
Format source codes
2017-05-25 16:08:08 +09:00
Nick Cameron
393ba27311
Remove dependency on Itertools
2017-05-25 16:23:07 +12:00
topecongiro
04bb5d8929
Format source codes
2017-05-24 00:07:02 +09:00
topecongiro
ec33121aaf
Format source codes
2017-05-23 22:13:29 +09:00
topecongiro
77a2e9858b
Format source codes
2017-05-23 11:37:33 +09:00
Michael Killough
c3c2e823cb
Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt into config
2017-05-18 13:05:19 +07:00
topecongiro
cfff3bd91e
Use multiline when signature does not fit single line
2017-05-17 16:31:09 +09:00
topecongiro
d7b6f1199f
Format source codes
2017-05-16 23:24:38 +09:00
Michael Killough
c0bdbfa531
Switch to accessing config items via method.
...
Preparation for #865 , which proposes adding a flag which outputs which
config options are used during formatting.
This PR should not make any difference to functionality. A lot of this
was search-and-replace.
Some areas worthy of review/discussion:
- The method for each config item returns a clone of the underlying
value. We can't simply return an immutable reference, as lots of
places in the code expect to be able to pass the returned value as
`bool` (not `&bool). It would be nice if the `bool` items could
return a copy, but the more complex types a borrowed reference... but
unfortunately, I couldn't get the macro to do this.
- A few places (mostly tests and `src/bin/rustfmt.rs`) were overriding
config items by modifying the fields of the `Config` struct directly.
They now use the existing `override_value()` method, which has been
modified to return a `Result` for use by `src/bin/rustfmt.rs`. This
benefits of this are that the complex `file_lines` and `write_mode`
strings are now parsed in one place (`Config.override_value`) instead
of multiple. The disadvantages are that it moves the compile-time
checks for config names to become run-time checks.
2017-05-16 15:47:09 +07:00
Seiichi Uchida
762db5138e
Format source codes
2017-05-15 22:55:45 +09:00
Nick Cameron
459b4449a6
Merge pull request #1442 from topecongiro/poor-formatting/trailing-comma
...
Remove comma from function definition with a single argument
2017-05-08 10:45:03 +12:00
topecongiro
e923df4146
Add indented and with_max_width
2017-05-08 07:24:12 +09:00
topecongiro
e7c6d34854
Use SeperatorTactic::Never for a single argument
2017-05-04 14:47:50 +09:00
topecongiro
f5da9d779f
Format source codes
2017-05-03 11:26:25 +09:00
topecongiro
93dae1a34d
Add test for empty tuple struct with comment
2017-05-02 10:21:39 +09:00
topecongiro
2e00c117e5
Handle empty tuple struct def properly
2017-05-02 10:21:39 +09:00
Vincent Esche
42dbe482e3
Made type_punctuation_density
apply too all +
in types
2017-05-02 01:03:46 +02:00
Nick Cameron
c546f1b396
Merge pull request #1454 from topecongiro/match
...
Format nested mathces properly.
2017-05-02 10:40:31 +12:00
topecongiro
9dc643a6ae
Remove TODO from 'format_tuple_struct'
2017-05-01 15:57:08 +09:00
topecongiro
68c5915176
Remove TODO from 'rewrite_generics'
2017-05-01 15:57:08 +09:00
topecongiro
02cf515be6
Format source codes
2017-04-24 16:50:11 +09:00
topecongiro
02c9ac93be
Prohibit long return val from 'rewrite_closure_block'
2017-04-17 23:17:17 +09:00
topecongiro
3a1ffa7db7
Split long fields in structs
...
This commit splits long fields in structs.
Closes #1412 .
2017-03-30 13:37:34 +09:00
Nick Cameron
5305bc8436
test fallout
2017-03-28 11:25:59 +13:00
Nick Cameron
5fb1140688
fallout - source reformatting
2017-03-28 11:14:47 +13:00
Nick Cameron
e4efa22983
Source formatting fallout
2017-03-28 10:58:41 +13:00
Nick Cameron
488c0b9546
Test and source fallout
2017-03-22 09:25:26 +13:00
Nick Cameron
4bb31a7231
Block indenting for struct lit patterns
...
Now follows struct_lit_style (and most other struct_lit_ options).
Required a fair bit of refactoring and bug fixes.
Fixes #1311
2017-03-22 09:25:26 +13:00
Nick Cameron
d4c5d572c8
Unify fn_args_layout and fn_arg_indent
...
Closes #1390
2017-03-20 11:59:08 +13:00
Nick Cameron
21ff1d43ba
Unify a bunch of option types into IndentStyle
2017-03-20 11:46:39 +13:00
Nick Cameron
c986e895bb
Remove FnArgLayoutStyle::BlockAlways
2017-03-20 11:35:53 +13:00
Nick Cameron
ce7b0aacd0
Remove BlockIndentStyle::Inherit
2017-03-20 11:23:44 +13:00
Nick Cameron
0c93e7dacf
Merge branch 'master' of github.com:rust-lang-nursery/rustfmt
2017-03-13 11:43:12 +13:00
Nick Cameron
ed10bf9532
Trailing comma for functions with empty bodies
2017-03-13 11:42:41 +13:00
Nick Cameron
4df405a768
Line breaking around generics in tuple structs
2017-03-13 11:25:46 +13:00
C4K3
ab832fa4bb
config: Rename ideal_width -> comment_width ( #1370 )
...
Since the config option only affects comment widths, and the previous
name has led to some confusion (see #1321 , #1152 ).
2017-03-13 09:07:33 +13:00
Nick Cameron
d5478f7d45
Reformatting source code
2017-03-10 16:06:05 +13:00
Nick Cameron
22be93780c
block generics in traits
2017-03-10 16:04:08 +13:00
Nick Cameron
a1d94e545c
Attempt to fixup impls with long generics
2017-03-10 15:58:35 +13:00
Nick Cameron
c8af03f475
Block formatting for tuple structs
...
Follows the fn_args_layout option
2017-03-10 15:31:45 +13:00
Nick Cameron
7b901130cb
Insert a newline before block-formatted generics
...
Fixes #1359
2017-03-10 14:29:45 +13:00
Nick Cameron
4b60d94a99
Check we can put the where clause on one line when we think we can
...
Fixes #1362
2017-03-10 09:45:26 +13:00
Nick Cameron
70085fca84
Try harder to format function sigs
...
Fixes #1363
2017-03-10 09:26:14 +13:00
Nick Cameron
d107ca12b8
Use trailing commas if block formatting fn args
...
Fixes #1330
2017-03-09 14:47:29 +13:00
Nick Cameron
6025492245
Implement where_style Rfc
2017-03-09 14:21:20 +13:00
Nick Cameron
33b83ae7df
Formatting fallout
...
Also fixes a minor bug when we break a line after `if` and used to leave a trailing space
2017-03-07 09:50:41 +13:00
Nick Cameron
f2eac0513f
Fix trailing comma tests
2017-03-02 14:27:33 +13:00
Nick Cameron
248f2aba56
Merge branch 'master' of github.com:rust-lang-nursery/rustfmt
2017-03-02 14:27:02 +13:00
David Wickes
371ffa4710
Small reformat
2017-02-26 22:28:53 +00:00
David Wickes
094c8898e1
Fix for #1255
...
Default annotation incorrectly removed on associated types
Fixed by adding a specific function to perform formatting on `ImplItems`.
2017-02-26 22:28:21 +00:00
Nick Cameron
6a58d91239
Coalesce trailing comma options
2017-02-24 10:31:23 +13:00
Nick Cameron
a7612cc773
more fallout
2017-02-23 13:15:48 +13:00
Nick Cameron
d9d2423764
Tweak chain rules
2017-02-23 13:15:48 +13:00
Nick Cameron
9eb78a3333
Fallout
2017-02-23 13:15:48 +13:00
Nick Cameron
b35906dbce
WIP
2017-02-21 16:35:05 +13:00
Nick Cameron
428339fdc3
Refactor indent and width into Shape struct
2017-01-31 08:35:23 +13:00
Nick Cameron
6054f28bd2
Some debugging stuff
2017-01-27 09:14:26 +13:00
Nick Cameron
309fb37f23
Allow some unused fields
2017-01-27 07:42:34 +13:00
Nick Cameron
6747cd721c
Start factoring out an abstract Item
2017-01-27 07:37:09 +13:00
Nick Cameron
3d3b6784d1
Nits
2017-01-26 15:44:54 +13:00
Nick Cameron
0b1d78bae1
Try hard to format impl signatures
...
Fixes #1249
2017-01-17 13:08:36 +13:00