Commit Graph

21 Commits

Author SHA1 Message Date
Nick Cameron
4f522794ae Tidy up and pass tests 2018-03-02 15:07:13 +13:00
topecongiro
4af2aa3a9e Create rustfmt_core crate 2018-02-07 22:48:05 +09:00
topecongiro
19d6a3c786 Put the opening brace of impl on the next line
We put the opening brace on the next line if the following conditions hold:

1. the result before '{' ends with comments or contains newline
2. the last line of the result before '{' is not extendable (i.e. consists of
   '>' and whitespaces).
2018-01-04 12:46:55 +09:00
topecongiro
a6d609b45e Add and update tests for #2320 and #2331 2018-01-04 12:46:05 +09:00
topecongiro
4f7cbc3aad Add tests for trait aliases 2017-12-15 13:47:32 +09:00
topecongiro
37b6855d9d Add a test for #2158 2017-11-16 11:26:12 +09:00
Seiichi Uchida
38a5350dcd Add a test for #2055 2017-11-10 21:20:54 +09:00
topecongiro
25bf1741b2 Update tests 2017-08-28 00:18:17 +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
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
Nick Cameron
6f30d9e7c9 Reformat tests 2017-06-13 14:42:54 +12:00
Connor Brewster
0a665aaceb Fixed nitpicks
Removed unneeded comment
Commented line wrapping conditions
Removed prefix param on `rewrite_associated_type`
Merged `rewrite_associated_static` into `rewrite_static`
Added extra tests
2016-03-15 14:08:12 -06:00
Connor Brewster
2793b4090c Added tests 2016-03-14 20:05:20 -06:00
Connor Brewster
35dfcc0078 Adding trait formatting
trait header formatting finished
generic formatting finished
added basic trait bounds formatting
2016-03-11 14:18:30 -07:00
Marcus Klaas
ea6ce22a16 Add regression test for overlong trait methods 2015-12-02 21:08:09 +01:00
Eli Friedman
be9e7dc689 Don't use visit::walk_*. Instead, recurse by hand.
This is much more straightforward to understand given how rustfmt
rewriting works, and it avoids walking into expressions in unexpected
places.

Fixes #513. Fixes #514.
2015-10-21 13:46:13 -07:00
Nick Cameron
840af4f84d Option for putting the where clause on the same line as the function if the body is empty. 2015-09-28 08:46:05 +13:00
Marcus Klaas
82b27fc4ab Correctly format typed self in function arguments 2015-08-14 11:56:27 +02:00
Marcus Klaas
500fb78a33 Format unnamed function arguments 2015-07-20 20:07:54 +02:00
Marcus Klaas
98c9c6e9ef implement framework for system tests 2015-06-05 17:50:22 +02:00