topecongiro
6c5ac5a9b3
Remove needless borrows
2017-11-06 13:52:25 +09:00
Afshin Mehrabani
f412c875ea
Adding where_single_line option ( #2030 )
...
* feat(where): adding where_single_line option and tests
* fix(where): adding more tests
* feat(where): changing the shape of where clause when where_single_line is true
* feat: newline_for_brace should avoid adding a new line where where_single_line is true
* fix(items): where_single_line should bypass the multi-item where clauses
* fix(items): refactoring and removing redundant variables
* fix(items): where_single_line should not be functional when args are multilined
* fix(config): fixing conflict with upstream
2017-11-06 11:53:17 +13:00
Nick Cameron
f1035d9782
Merge pull request #2116 from topecongiro/config-options-indent
...
Rename config options related to indent
2017-11-06 08:43:12 +13:00
Nick Cameron
0b481ceced
Merge pull request #2113 from topecongiro/issue-2110
...
Use correct span for tuple struct's body
2017-11-06 08:21:56 +13:00
Pascal Hertleif
536526685d
Fix compile on 2017-11-04 nightly
...
Breakage came from https://github.com/rust-lang/rust/pull/45247/
2017-11-05 12:26:06 +01:00
Anthony Deschamps
18ac341413
Handle case where there is a where clause but no generic parameters.
...
Fixes #2103
2017-11-04 15:25:09 -04:00
topecongiro
55c2000d94
Rename 'fn_args_layout' to 'fn_args_indent'
2017-11-04 22:45:47 +09:00
topecongiro
16302d3578
Use get_bytepos_after_visibility()
2017-11-03 23:53:38 +09:00
topecongiro
3973cdd0a8
Use correct span for tuple struct's body
2017-11-03 23:53:07 +09:00
topecongiro
84526ab87e
Add get_bytepos_after_visibility()
2017-11-03 23:51:19 +09:00
Seiichi Uchida
b0d6d03a25
Use correct budget
2017-10-30 23:38:05 +09:00
Paul Lietar
c1e897907a
Add suport for extern types.
...
See https://github.com/rust-lang/rust/pull/44295
2017-10-30 08:46:11 +13:00
Nick Cameron
96566276e3
Fix build
...
Fixes #2096
2017-10-30 07:39:28 +13:00
Nick Cameron
5233f9cde0
Add support for crate
shorthand for pub(crate)
2017-10-28 18:41:58 +13:00
Nick Cameron
e2a5c78e4b
Merge pull request #2043 from sunjay/lift_generics
...
Lifted generics to account for changes in rust-lang/rust#44766
2017-10-28 18:14:13 +13:00
Nick Cameron
0a59654b41
Merge pull request #2084 from topecongiro/issue-2081
...
Use rewrite_assign_rhs when rewriting unit variant
2017-10-27 02:15:22 +05:30
Nick Cameron
038f711c6e
Merge pull request #2083 from topecongiro/issue-2082
...
Use a correct span for fn with pub(crate) syntax
2017-10-27 02:14:29 +05:30
topecongiro
a67b8b0bbb
Use rewrite_assign_rhs when rewriting unit variant
2017-10-25 01:08:32 +09:00
topecongiro
7b9a4e6a06
Use a correct span for fn with pub(crate) syntax
2017-10-25 00:51:04 +09:00
topecongiro
0d359eacd7
Cargo fmt
2017-10-18 22:23:25 +09:00
Sunjay Varma
3f11c4b93a
Updated rustfmt to account for changes from rust-lang/rust#44766
2017-10-17 15:37:07 -04:00
Seiichi Uchida
530a845d2f
Simplify multiline case in rewrite_struct_field()
2017-10-08 22:36:03 +09:00
Seiichi Uchida
55fc5b5ec2
Get rid of rewrite_struct_field_type()
2017-10-08 22:35:45 +09:00
Nick Cameron
802df67c2f
Merge pull request #2035 from topecongiro/deprecate-try_opt!
...
Replace `try_opt!` macro with a `?` operator
2017-10-05 20:45:52 +08:00
Nick Cameron
99f14a87ae
Merge pull request #2029 from wada314/fix-crlf
...
Fix broken tests under CRLF environment.
2017-10-05 20:07:29 +08:00
topecongiro
fe69dde96b
Replace 'try_opt!' macro with a '?' operator
2017-10-05 20:50:19 +09:00
Nick Cameron
69ab2b5f5e
Merge pull request #2023 from topecongiro/issue-2020
...
Use a correct budget for where predicate
2017-10-05 18:09:49 +08:00
Shohei Wada
25d2671c55
Fix broken tests under CRLF env.
2017-10-05 00:23:17 +09:00
Nick Cameron
c31c24de36
Merge pull request #2014 from topecongiro/fn-sig
...
Reduce number of arguments in rewrite_fn()
2017-10-04 20:18:02 +08:00
Nick Cameron
2aa2d4ebe3
Merge pull request #2011 from topecongiro/rewrite_call_inner
...
Change return type of rewrite_call_inner() to Option<String>
2017-10-04 20:14:10 +08:00
Seiichi Uchida
eebad40932
Use a correct budget for where predicate
2017-10-02 00:04:48 +09:00
Nick Cameron
6e41100725
Merge pull request #2005 from topecongiro/issue-2003
...
Put the opening brace of fn body on the next line if it exceeds max width
2017-09-29 21:27:37 +08:00
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