Nick Cameron
f63815ee95
Merge pull request #1435 from iliekturtles/line-length
...
Do not count `\r` as part of line width.
2017-04-03 08:40:22 +12:00
Nick Cameron
20395c5c55
Merge pull request #1430 from fintelia/stdin_lines
...
The --file_lines argument now supports "stdin"
2017-04-03 08:27:35 +12:00
Nick Cameron
e94a97d9a1
Merge pull request #1431 from topecongiro/fix-1428
...
Check existence of pre comment explicitly
2017-04-03 07:53:18 +12:00
Mike Boutin
a0efdf2de9
Do not count \r
as part of line width.
...
Resolves #1335 . Does not attempt to handle a `\r` not followed by a `\n` nor
attempt to handle Unicode intricacies (#6 ) including zero-width or multi-byte
characters.
2017-04-02 11:09:29 -04:00
Jonathan Behrens
6241469a69
Warn about extra files listed in file_lines argument
2017-03-31 13:34:53 -04:00
topecongiro
34b90d8716
Check existence of pre comment explicitly
...
This commit fixes #1428 .
2017-03-31 21:57:29 +09:00
Jonathan Behrens
56da223dc2
--file_lines argument now supports "stdin"
2017-03-30 19:35:58 -04:00
Nick Cameron
3edc184221
Merge pull request #1413 from Emilgardis/master
...
Implemented support for workspaces
2017-03-31 08:43:40 +13:00
Nick Cameron
4f226eb909
Merge pull request #1424 from topecongiro/long-struct
...
Split long fields in structs
2017-03-31 08:42:40 +13: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
6c206d2931
Skip doctests
2017-03-30 15:49:10 +13:00
Nick Cameron
5fb2fc910b
Merge pull request #1423 from fintelia/master
...
Format any statement whose span intersects file_lines
2017-03-30 15:33:36 +13:00
Emil Gardström
6971b4b5c9
Implemented support for workspaces
...
closes rust-lang-nursery/rustfmt#1244
2017-03-30 03:29:32 +02:00
Jonathan Behrens
36f0402bac
Canonicalize range path in FileLines::intersects()
2017-03-29 18:50:39 -04:00
Jonathan Behrens
b6f1b516d9
Format any statement whose span intersects file_lines
2017-03-29 01:33:14 -04:00
Nick Cameron
603f26d8f1
Merge pull request #1415 from topecongiro/remove-duplicates
...
Remove duplicates
2017-03-29 17:51:19 +13:00
topecongiro
78826e6783
Fix a typo
2017-03-29 09:17:58 +09:00
Nick Cameron
3d2e52a214
Merge pull request #1416 from fanzier/master
...
Omit space before '\n' + comment (fixes #457 )
2017-03-29 07:55:48 +13:00
Fabian Zaiser
6ecc18c7de
Omit space before '\n' + comment ( fixes #457 )
2017-03-28 16:32:12 +02:00
topecongiro
a2d57e956a
Remove duplicate definitions
...
This commit removes duplicated definitions of `type_annotation_separator` and
`type_bound_colon`.
2017-03-28 23:20:50 +09:00
Nick Cameron
7377dfc38c
release v8.1
2017-03-28 13:19:59 +13:00
Nick Cameron
5305bc8436
test fallout
2017-03-28 11:25:59 +13:00
Nick Cameron
a8692797ae
Use a release build in the bootstrap script
2017-03-28 11:20:11 +13:00
Nick Cameron
5fb1140688
fallout - source reformatting
2017-03-28 11:14:47 +13:00
Nick Cameron
a079b87e7c
Use a char len heuristic rather than item count for chain_one_line_max
2017-03-28 11:12:15 +13:00
Nick Cameron
91bbe0ff8b
Test fallout
2017-03-28 11:01:44 +13:00
Nick Cameron
e4efa22983
Source formatting fallout
2017-03-28 10:58:41 +13:00
Nick Cameron
038436919d
Put the second element of a chain on its own line when block formatting.
2017-03-28 10:56:46 +13:00
Nick Cameron
8bca85c4b6
Support block indent for function calls
...
Uses the `fn_call_style` option.
Fixes #1358
2017-03-28 10:43:46 +13:00
Nick Cameron
f53d5dd90c
Merge pull request #1409 from alobb/1408-empty-tuple-enum-decl
...
Prevent conversion of empty tuples to unit structs
2017-03-27 14:28:41 +13:00
Aaron Lobb
548de69d2d
Prevent conversion of empty tuples to unit structs
...
Fixes #1408
2017-03-26 15:47:48 -07:00
C4K3
abca1deded
Add indent_match_arms option ( #1404 )
...
Makes it optional whether to indent arms in match expressions. Setting this
to false may be desirable for people wishing to avoid double-indents, in
that if the match arm is a block, the block will cause an extra indentation
level, and if it isn't a block but just a single line, it's still easy to
see the logic at a glance.
This style is preferred in certain other languages with switch statements,
e.g. Linux style C and the most common Java style.
2017-03-26 18:32:29 +13:00
Aaron Lobb
0dd0cc1941
Break use
statements into multiple lines ( #1407 )
...
This fixes how line lengths for use statements with multiple
items don't extend beyond the maximum line length.
Fixes #1400
2017-03-26 18:21:43 +13:00
Jon Gjengset
f96e56c3a0
Avoid extra comma in vertical single-field struct patterns ( #1403 )
...
* Add (failing) test for #1397
* Fix for #1397
Specifically, we end up double-adding a trailing comma for single-member
struct patterns that are arranged vertically. One is added by write_list
(since such structs return true for needs_trailing_separator), and
another is added by the if in the old code.
2017-03-26 18:16:45 +13:00
C4K3
6be61bcdd6
Warn on unused config options ( #1402 )
...
This will make it clear if a user has misspelled a config option, or if
an option has been changed/removed.
2017-03-26 18:12:56 +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
Robert Gawdzik
bfb1c277a8
Make list_files deterministic ( Closes #1141 ) ( #1393 )
...
- Use BTreeMap instead
2017-03-22 09:00:33 +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
13a6644074
Update RFC toml file
2017-03-20 10:27:01 +13:00
Nick Cameron
0cb6f56647
Block formatting for arrays
...
Fixes #1331
2017-03-20 10:26:19 +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