Marcus Klaas
954dd0869e
Preserve mutability for typed self arguments
2015-12-25 19:07:51 +01:00
Marcus Klaas
2636fed5f3
Don't panic on function return type rewrite failure
2015-12-12 15:41:10 +01:00
Nick Cameron
585b071aa1
Merge pull request #678 from marcusklaas/length-one-tuplez
...
Fixed named arguments in bare function types
2015-12-07 09:01:38 +13:00
Nick Cameron
f569144bbf
Merge pull request #666 from marcusklaas/matches-5000
...
Break function headers earlier
2015-12-07 08:07:23 +13:00
Marcus Klaas
97e4e7e5ba
Fixed named arguments in bare function types
2015-12-06 01:11:26 +01:00
Markus Westerlind
a6b0d475f4
Don't remove where clauses in type aliases
2015-12-02 20:11:17 +01:00
Markus Westerlind
ae9ad7b288
Fix formatting of type aliases where '=' is at or close to the max width
2015-12-02 20:11:10 +01:00
Marcus Klaas
76f303f369
Break function headers earlier
...
Closes rustfmt#295.
2015-12-01 22:09:37 +01:00
Markus Westerlind
17fd2d073b
Add a BraceStyle parameter to rewrite_where_clause
...
This allow it to exactly calculate if it needs to break the where clause into multiple lines
2015-12-01 19:51:49 +01:00
Markus Westerlind
052fddd4dd
Use the BraceStyle config to calculate the width for braces in where clasues
2015-11-28 13:59:14 +01:00
Markus Westerlind
937467c358
Fix where clauses not taking the width of the line into account
...
Fixes #630
2015-11-27 09:27:41 +01:00
Markus Westerlind
0021001a07
Use utils::last_line_width in rewrite_type_alias
2015-11-26 21:28:00 +01:00
Markus Westerlind
c61d6d4c3a
Format type aliases
...
Fixes #486
2015-11-26 21:04:49 +01:00
Nick Cameron
68bc387925
Merge pull request #655 from kyeah/impl-comments
...
Keep comments in empty impl body
2015-11-26 17:59:22 +13:00
Seo Sanghyeon
2b11d84119
Apply Clippy
2015-11-25 15:39:15 +09:00
Kevin Yeh
b6dc8a3f76
Keep comments in empty impl bodies
2015-11-24 12:55:32 -06:00
Nick Cameron
d405fdc236
Fix a bug with nested impls
2015-11-24 09:37:52 +13:00
Marcus Klaas de Vries
5a3f5bc1f6
Merge pull request #646 from rust-lang-nursery/mulit-file
...
Handle multiply-referenced files
2015-11-23 21:35:09 +01:00
Nick Cameron
40eb3ea857
Merge pull request #641 from marcusklaas/fix-doc-commentz
...
Correct doc comment indentation for struct fields
2015-11-23 13:58:19 +13:00
Nick Cameron
9cf8529e33
Implement formatting for impls
...
Fixes #614
2015-11-23 13:09:00 +13:00
Marcus Klaas
4b4dd170d8
Correct doc comment indentation for struct fields
...
Fix https://github.com/rust-lang-nursery/rustfmt/issues/572 .
2015-11-22 22:55:57 +01:00
Marcus Klaas
840012b5e0
Format bare function types
...
Fix https://github.com/rust-lang-nursery/rustfmt/issues/616 .
Fix https://github.com/rust-lang-nursery/rustfmt/issues/276 .
Close https://github.com/rust-lang-nursery/rustfmt/issues/350 .
2015-11-22 16:07:38 +01:00
Marcus Klaas
559f00ba99
Fix up indentation of function style paths
...
Fixes https://github.com/rust-lang-nursery/rustfmt/issues/105 .
2015-11-22 14:48:30 +01:00
Marcus Klaas
1b0ae00488
Extract fn rewrite methods from RewriteVisitor
2015-11-22 13:45:51 +01:00
Marcus Klaas
7b0cceafee
Force chains to adhere to restrictions
2015-11-20 21:09:34 +01:00
Marcus Klaas
6e1f77664d
Unwrap match arms that are simple blocks
2015-11-20 21:05:18 +01:00
Marcus Klaas
8f3a29d1a7
Blockify multiline match arms
2015-11-20 21:05:10 +01:00
Kevin Yeh
2e9b6dfab4
Combine rewrite_single_line_fn and rewrite_fn
2015-11-19 20:49:24 -06:00
Kevin Yeh
15ec5b2912
Fix empty body format, add fn_empty_single_line option, refactor block tests
2015-11-19 20:45:02 -06:00
Kevin Yeh
fbd1398c92
Implement Rewrite for ast::Stmt
2015-11-19 14:23:56 -06:00
Kevin Yeh
22837b0748
Combine block utilities
2015-11-19 14:23:56 -06:00
Kevin Yeh
4d7de5a16e
Support single-line functions
...
By default, places functions with empty bodies on one line.
If the function has only one expression or statement that fits on one line, the 'fn_single_line' option can be used.
2015-11-19 14:23:56 -06:00
Nick Cameron
f09aa85798
Merge pull request #619 from SiegeLord/item_brace_style_1
...
Implement initial option for brace style for non-fn items.
2015-11-20 07:41:12 +13:00
Pavel Sountsov
1056006790
Properly follow the brace styles.
2015-11-18 22:34:14 -08:00
Nick Cameron
56a765ef05
Rustup
2015-11-16 14:16:46 +13:00
Pavel Sountsov
8658774ad2
Implement initial option for brace style for non-fn items.
2015-11-15 11:55:18 -08:00
Marcus Klaas
d32245a13d
Fix brace indentation after where clause
2015-11-13 14:31:20 +01:00
Nick Cameron
bcda2824a2
Format tuple structs better
...
closes #546
2015-11-09 19:00:04 +13:00
Florian Zeitz
2aa35f0f6d
Honor "enum_trailing_comma" option. Fixes #556
2015-11-03 23:57:31 +01:00
Marcus Klaas
d122ad5adc
Address some issues with multiline patterns in let statements
2015-10-24 13:13:15 +02:00
Marcus Klaas
e8447a8210
Fix large block comments
2015-10-19 23:06:36 +02:00
Marcus Klaas
11756d2ef8
Refactor enum formatting
2015-10-19 21:28:05 +02:00
Marcus Klaas de Vries
754925e132
Merge pull request #484 from marcusklaas/patternz
...
Format some patterns
2015-10-19 20:20:29 +02:00
Marcus Klaas
ca023ba9b7
Format some patterns
2015-10-19 20:15:36 +02:00
Marcus Klaas
7e0456b852
Format visibility for statics and consts
2015-10-19 20:08:03 +02:00
Marcus Klaas de Vries
8a9bbd9d7c
Merge pull request #487 from marcusklaas/konsts-n-statix
...
Format constants and static variables
2015-10-18 23:03:01 +02:00
Marcus Klaas
3ce425c9ed
Factor out common item indentation idiom
2015-10-18 22:59:39 +02:00
Marcus Klaas
8e2a910021
Fix indentation for function arguments
2015-10-18 22:22:41 +02:00
Marcus Klaas
1a7d39041e
Format constants and static variables
2015-10-18 21:36:26 +02:00
Nick Cameron
d326a29b4b
Merge pull request #479 from marcusklaas/moar-types
...
Format more type variants
2015-10-18 15:40:11 +13:00