Bryce Van Dyk
74d40c042f
Update block checking code
2015-12-02 16:44:40 +13: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
Bryce Van Dyk
7ce887abcf
Update trailing comma match logic, add tests
...
Updates the traling comma code to attempt to handle multiline non-block bodies when
adding traling commas to blocks. Also add and update tests to cover better
the interactions between trailing commas and wrapping match arms.
2015-12-01 20:10:57 +13:00
Marcus Klaas
0fb9611786
Don't include failed item rewrites in missed spans
2015-11-30 23:12:50 +01:00
Bryce Van Dyk
2a430a8947
Trailing commas for match block arms
...
Attempt to implement an option for trailing commas for block based match arms (issue
173). Put in place test files to verify this behaviour.
2015-11-30 21:51:20 +13: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
Nick Cameron
36d65e4538
Merge pull request #662 from crumblingstatue/patch-1
...
Fix typo in README.md
2015-11-28 22:14:24 +13:00
Mika Attila
bf36369032
Fix typo in README.md
...
We conform to (i.e. comply with) the Rust Style Guidelines, not confirm their validity.
2015-11-28 10:03:46 +01:00
Nick Cameron
a2804dbd25
Merge pull request #660 from sanxiyn/unused-import
...
Remove unused imports
2015-11-28 10:03:03 +13:00
Seo Sanghyeon
17c8fb10ea
Remove unused imports
2015-11-27 23:38:05 +09: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
Nick Cameron
28922f37dd
Merge pull request #640 from Marwes/alias
...
Format type aliases
2015-11-27 09:30:10 +13: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
Kevin Yeh
314aff1a33
Reformat trim_newlines
2015-11-25 22:46:11 -06:00
Nick Cameron
6b1002da81
Merge pull request #658 from sanxiyn/clippy
...
Apply Clippy
2015-11-25 20:07:21 +13:00
Seo Sanghyeon
2b11d84119
Apply Clippy
2015-11-25 15:39:15 +09:00
Kevin Yeh
f5fac4c54f
Fix empty trim_newline panic, add impl macro test
2015-11-24 14:37:31 -06:00
Kevin Yeh
c408245e5d
Add impl newline tests
2015-11-24 13:02:55 -06:00
Kevin Yeh
b6dc8a3f76
Keep comments in empty impl bodies
2015-11-24 12:55:32 -06:00
Marcus Klaas de Vries
7483c2a8f9
Merge pull request #642 from rust-lang-nursery/impl
...
Implement formatting of impls
2015-11-23 22:09:28 +01: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
ebd876afb2
Merge pull request #649 from jaxx/dependency-upd1
...
update dependencies and fix compile errors
2015-11-24 08:08:35 +13:00
Jakko Sikkar
411fa40988
update dependencies and fix compile errors
2015-11-23 20:54:33 +02:00
Nick Cameron
2661592d59
Handle multiply-referenced files
...
Fixes #645
2015-11-23 15:22:00 +13: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
e3f39941de
Types which can be return types for function types
...
Fixes #643
2015-11-23 13:55:53 +13:00
Nick Cameron
e86872c95b
tests
2015-11-23 13:09:00 +13:00
Nick Cameron
b577f95e3c
Reformatting due to changes
2015-11-23 13:09:00 +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 de Vries
08e6e74e69
Merge pull request #639 from rust-lang-nursery/mod-skip
...
Take rustfmt_skip attribute into account on modules
2015-11-22 22:16:31 +01:00
Nick Cameron
ba936766c6
Take rustfmt_skip attribute into account on modules
...
Closes #632
2015-11-23 09:20:53 +13:00
Nick Cameron
b9832f2e9f
Merge pull request #638 from marcusklaas/visual-struct-last-comment
...
Fix last comment for visually formatted struct lits
2015-11-23 07:23:58 +13:00
Nick Cameron
0b845c10eb
Merge pull request #637 from marcusklaas/fn-type
...
Improve function type formatting
2015-11-23 07:22:26 +13:00
Marcus Klaas
2b0a25a539
Fix last comment for visually formatted struct lits
2015-11-22 17:41:54 +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
Nick Cameron
3b6e332492
Merge pull request #636 from KiChjang/spelling
...
Fix incorrect usage of 'it's'
2015-11-22 18:37:51 +13:00
Keith Yeung
b205fb6af2
Fix incorrect usage of 'it's'
2015-11-21 15:55:42 -08:00
Marcus Klaas de Vries
a871405f45
Merge pull request #633 from marcusklaas/mod-comment
...
Rewrite module declarations
2015-11-21 21:24:29 +01:00
Marcus Klaas
49e2a146b1
Rewrite module declarations
2015-11-21 21:06:29 +01:00
Marcus Klaas de Vries
2a159e05ac
Merge pull request #635 from Marwes/long_field_access
...
Fix long field accesses not being broken onto separate lines
2015-11-21 21:04:34 +01:00
Markus Westerlind
465662a691
Fix long field accesses not being broken onto separate lines
...
Fixes #512
2015-11-21 01:05:31 +01:00
Nick Cameron
7809e3bb18
Merge pull request #634 from Marwes/block_comment_crlf
...
Avoid adding an extra newline after block comments
2015-11-21 12:47:53 +13:00
Markus Westerlind
ad7dc420cd
Avoid adding an extra newline after block comments
...
When block comments were rewritten to line comments they check if a new line needs to be added and adds one if needed. It only checked for '\n' however which would cause a newline to be added even if the comment was ended by "\r\n"
2015-11-20 23:31:05 +01:00