rChaser53
7926851bb0
stop to strip 'impl' from impl trait type alias ( #3816 )
2019-10-04 11:25:16 +09:00
Caleb Cartwright
9c2b375ba9
refactor to use param naming where appropriate ( #3803 )
2019-09-24 09:25:19 +09:00
Caleb Cartwright
6b0a447150
feat: support parameter attributes ( #3793 )
2019-09-20 16:11:52 +09:00
Seiichi Uchida
5baba86fe5
Update rustc-ap-* crates to 581.0.0 ( #3783 )
2019-09-06 22:41:03 +09:00
Andrey
950b288d6f
do not remove discriminant value if exists ( #3771 ) ( #3772 )
2019-09-04 23:01:04 +09:00
Seiichi Uchida
1643d726ef
Use correct indent when formatting complex fn type ( #3731 )
2019-08-16 11:15:28 +09:00
Seiichi Uchida
4871d6467a
Use the correct BytePos for the opening brace position ( #3742 )
2019-08-13 23:21:55 +09:00
Seiichi Uchida
b004329782
Simplify code around visit_fn ( #3698 )
2019-07-21 13:26:41 +09:00
Seiichi Uchida
1d19a08ed4
Format the last expression-statement as expression ( #3631 )
2019-06-17 08:53:39 +09:00
rChaser53
5607178d0a
fix the bug add unwanted code to impl ( #3601 ) ( #3602 )
2019-06-06 13:06:40 +09:00
Stéphane Campinas
e0459eb3fe
inline the attribute with its item even with the macro_use attribute or when reorder_imports is disabled ( #3598 )
2019-06-05 00:14:12 +09:00
Seiichi Uchida
2244f326e6
Cargo update ( #3559 )
...
Update `rustc-ap-*` crates to 486.0.0.
2019-06-03 23:57:02 +09:00
Stéphane Campinas
e6b60a40d5
stabilise fn_args_density ( #3581 )
2019-06-03 22:26:48 +09:00
topecongiro
c1373b267b
Format trait aliases with where clauses
2019-05-26 21:15:55 +09:00
topecongiro
95c2ad37e1
Refactor rewrite_where_clause
2019-05-26 21:15:38 +09:00
Seiichi Uchida
b5449ba785
Allow overflowing rhs of unit variant ( #3566 )
2019-05-22 10:51:19 +09:00
rchaser53
53142b486d
use the span between the self_ty and left brace
2019-05-16 21:27:34 +09:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint
2019-05-09 20:37:51 +02:00
Matthias Krüger
4352681d62
fix clippy warnings
...
clippy::needless_return
clippy::redundant_closure
clippy::or_fun_call
clippy::len_zero
clippy::expect_fun_call
clippy::assertions_on_constants
clippy::identity_conversion
clippy::chars_last_cmp
2019-04-11 13:48:13 +02:00
Stéphane Campinas
bf383c4610
keep missed comments appearing after the struct/enum ident
2019-04-05 17:11:11 +02:00
Stéphane Campinas
8e068510a4
keep comment appearing between parameter's name and its type ( #3491 )
2019-04-03 18:16:54 +09:00
Shotaro Yamada
9fda937779
Remove redundant &
2019-03-29 19:17:50 +09:00
Seiichi Uchida
ce5cccc32c
Update rustc-ap-* crates to 407.0.0 ( #3447 )
2019-03-14 22:50:53 +09:00
rchaser53
8e3ef3e3a9
fix not to remove comment in the case of no arg
2019-03-05 00:18:33 +09:00
rchaser53
dec3902076
leave post comment for self
2019-03-02 17:33:43 +09:00
rchaser53
ae7330eea4
leave pre comment for self
2019-02-24 22:05:08 +09:00
Alexander Regueiro
7a3b7c9275
Various cosmetic improvements ( #3403 )
2019-02-19 11:56:42 +09:00
topecongiro
96a3df3b5c
Format visibility on trait alias
2019-02-12 10:16:12 +09:00
Hirokazu Hata
8183b949c4
cargo fmt
2019-02-09 16:20:38 +09:00
Hirokazu Hata
4bb90f5cc8
Fix rust_2018_idioms warnings
2019-02-09 16:14:30 +09:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
topecongiro
0142e961ad
Prioritize single_line_fn and empty_item_single_line over brace_style
...
When either one of these two options are set to `true`, each should take
precedence over the brace_style option.
This commit does not introduce any formatting change to the default
configuration, so no version gate is required.
2019-02-01 00:22:47 +09:00
rchaser53
f92f3e3bda
add the version gate to the code and test
2019-01-27 14:38:57 +09:00
rchaser53
7b996542cc
change new line point in the case of no args
2019-01-26 00:16:51 +09:00
Philipp Hansch
d0785954c8
Fix trim_right/trim_left deprecation warnings ( #3252 )
2018-12-18 11:21:31 +09:00
Stéphane Campinas
a4e97fa17b
compute the span after a struct-like item based on the ident description
2018-11-13 21:10:30 +01:00
Stéphane Campinas
7132fe03a0
fix alignment of a struct's fields with the visual style
...
- rewrite_with_alignment was called from the expr module with the wrong
shape that missed the extra offset needed for the visual style
- rewrite_with_alignment was indenting the given shape although that
should have been the caller's responsability
2018-11-04 23:41:21 +01:00
Nick Cameron
825207dd2e
Merge pull request #3126 from topecongiro/issue-3117
...
Use correct width when formatting type on local statement
2018-10-23 10:35:32 +13:00
Seiichi Uchida
086c183447
Use correct width when formatting type on local statement
2018-10-22 22:20:51 +09:00
Matthias Krüger
b25f974c0d
fix a few typos found via codespell.
2018-10-19 12:28:00 +02:00
Shotaro Yamada
6c964fd030
Reduce allocations
2018-10-15 23:59:08 +09:00
Shotaro Yamada
751bcf5fa0
Clippy
2018-10-15 23:59:08 +09:00
Seiichi Uchida
fdfb489c48
Add a correct indent before trait's closing brace with empty body
2018-10-14 21:47:55 +09:00
Nick Cameron
d0c6a6d642
Merge pull request #3067 from topecongiro/refactor-toexpr
...
Add println!-like heuristic to the fail attribute
2018-10-08 12:38:33 +13:00
Seiichi Uchida
003fc730e6
Fix empty types being inserted to closure
...
cc https://github.com/rust-lang/rust/pull/54229 .
2018-10-07 00:52:06 +09:00
Seiichi Uchida
755d27a424
Take impl Iterator for overflow routines
2018-09-29 14:33:00 +09:00
Nick Cameron
3dc6eed601
Merge pull request #2816 from moxian/enum-discrim
...
Add option to vertically align enum discriminants.
2018-09-28 21:48:57 +12:00
moxian
65ae0b9a09
Change enum align semantics to care about absolute length, rather than difference.
...
If we're only aligning enum discriminants that are "not too far apart
(length-wise)", then this works really well for enums with
consistently-long or consistently-short idents, but not for the mixed
ones.
However, consistently-long idents is somewhate of an uncommon case and
overlong idents may be allowed to be formatted suboptimally if that
makes mixed-length idents work better (and it does in this case).
2018-09-26 18:47:17 +00:00
moxian
cc22869fb4
Add option to vertically align enum discriminants.
2018-09-26 14:35:38 +00:00
André Luis Leal Cardoso Junior
2727d41ddb
Makes brace behavior consistent with empty bodies for traits and impls
...
Adds a newline before the last brace on impls without a body if the first brace is also on a newline
2018-09-26 09:44:13 -03:00
Nick Cameron
cd8549e013
Merge pull request #3036 from topecongiro/issue-2932
...
Combine chain items only when the item gets orphaned otherwise
2018-09-20 11:36:46 +12:00
Seiichi Uchida
e2b9c66cc9
Cargo fmt
2018-09-19 23:22:26 +09:00
Seiichi Uchida
7eca33f8a5
Format generics on associated types
2018-09-19 22:33:28 +09:00
Seiichi Uchida
d8357484ac
Refactor the corner case of handling long function
2018-09-11 13:31:37 +09:00
Seiichi Uchida
ad903e08fd
Keep formatting fn even if there is an unformattable argument
2018-08-30 23:39:39 +09:00
cad97
fc1909d311
Reformat
2018-08-23 17:14:19 -04:00
cad97
04d804c365
Rename CodeMap/FileMap to SourceMap/SourceFile
...
#2946
2018-08-23 17:10:46 -04:00
Seiichi Uchida
024c03e81b
Use builder pattern for ListFormatting
2018-08-03 22:13:20 +09:00
Benjamin Brittain
46b241004d
fix nits
2018-07-29 17:20:21 -07:00
Ben Brittain
fedde3790c
Add tests for async & async move
2018-07-29 08:55:36 -07:00
Ben Brittain
0b25f602fd
Format Async block and async fn
2018-07-29 08:05:38 -07:00
Seiichi Uchida
7b37776ade
Modify the rule for reordering impl items
...
1. If two items have the same kind, then reorder them based on its ident.
2. Handle existential type.
2018-07-26 21:37:23 +09:00
Seiichi Uchida
6cecdd681f
Put lifetimes after trait when they gets orphaned
2018-07-25 08:44:32 +09:00
Seiichi Uchida
6d7a764b3d
Remove span from rewrite_generics's parameter
...
We can just use the span from ast::Generics.
2018-07-25 00:34:46 +09:00
Seiichi Uchida
fc307ff582
Format exitential type
2018-07-25 00:30:01 +09:00
Nick Cameron
481e85cc58
formatting
2018-07-24 15:46:39 +12:00
Nick Cameron
71d3d04270
factor out a Session
object
2018-07-23 15:37:34 +12:00
Nick Cameron
486f8fd8e7
Fixup formatting of tests and source
2018-07-12 21:37:28 +12:00
topecongiro
57a6cae49f
Fix span bug when searching for the closing paren
2018-06-30 19:21:15 +09:00
Seiichi Uchida
cc2afeca9e
Fix compile errors from breaking changes
2018-06-28 16:26:10 +09:00
Seiichi Uchida
3027c21371
Handle raw identifiers
2018-06-25 23:36:45 +09:00
topecongiro
e5e1e0cea8
Fix compile errors from breaking changes in libsyntax
...
cc https://github.com/rust-lang/rust/pull/48149 .
2018-06-25 15:24:00 +09:00
Nick Cameron
87edd75ecf
TODO -> FIXME
...
Or just delete
Closes #25
2018-06-22 14:42:27 +12:00
Josh Chase
ee5ff2d9e8
Add flag to the ListFormatting struct for nested imports
2018-06-19 12:13:35 -04:00
Seiichi Uchida
a4db62368b
Respect empty_item_single_line config option when formatting empty impls
2018-06-06 10:55:25 +09:00
Seiichi Uchida
d51b99f5d7
Put the where clause next to the closing bracket only when it is not indented
2018-06-06 10:54:40 +09:00
Seiichi Uchida
2e4376d29c
Do not put where clause on a single with multi-lined type
2018-06-06 10:46:49 +09:00
Seiichi Uchida
8d01496c9e
Remove unreachable lines
2018-06-06 10:46:18 +09:00
csmoe
faa41168a9
format exceeded comments
2018-06-05 07:35:51 +08:00
csmoe
8874c95a00
recover suppressed comma
2018-06-04 19:10:09 +08:00
csmoe
0468c134f4
snuggle where
2018-05-31 18:33:45 +08:00
csmoe
8536c288f2
suppress and compress
2018-05-31 17:58:48 +08:00
Nick Cameron
353816c596
Merge pull request #2730 from topecongiro/issue-2704
...
Disallow combining a method call with prefix or suffix
2018-05-23 20:10:49 +12:00
topecongiro
8cb2b8e909
Cargo fmt
2018-05-23 07:22:59 +09:00
topecongiro
a6b32d944c
Fix breaking changes from introducing AnonConst
2018-05-23 06:04:32 +09:00
Thomas Lively
5d56adb10c
Fix position of auto in auto trait declaration
2018-05-18 17:25:33 -04:00
Nick Cameron
d726492e65
Remove spaces_within_parens_and_brackets
...
cc #1974
2018-05-18 16:35:09 +12:00
Shotaro Yamada
d1e2b80fb9
Use saturating_sub
2018-05-15 20:41:43 +09:00
topecongiro
bd25c7d0f7
Cargo fmt
2018-05-08 06:25:48 +09:00
topecongiro
1f738ea208
Cargo fmt
2018-05-06 15:22:29 +09:00
topecongiro
37c216c50f
Use bytepos to compare impl items
2018-04-30 16:19:52 +09:00
topecongiro
48e193c7f6
Factor out visit_impl_items
2018-04-30 16:13:51 +09:00
Nick Cameron
e554d8617d
Merge branch 'master' into imports_indent
2018-04-30 11:50:53 +12:00
Nick Cameron
dae9fb64b6
Merge pull request #2656 from topecongiro/issue-2594
...
Use consistent formatting for empty enum and struct
2018-04-30 11:06:33 +12:00
csmoe
f7415bcea2
update self format
2018-04-29 20:53:31 +08:00
Ryan Leung
fb9a5add9b
add rustc_target to dependencies ( #2660 )
2018-04-28 16:08:58 +09:00
topecongiro
e512c19ed5
Use format_empty_struct_or_tuple over format_missing_no_indent
...
Closes #2594 .
2018-04-28 14:03:14 +09:00
topecongiro
fb0c6affa5
Use format_empty_struct_or_tuple
2018-04-28 13:59:54 +09:00
topecongiro
82d8dd2f4b
Factor out a formatting routine for empty struct and tuple
2018-04-28 13:59:03 +09:00
topecongiro
a955365459
Use a glob import for import utils
2018-04-28 13:24:05 +09:00
Seiichi Uchida
ac8ae00625
Cargo update and clippy ( #2643 )
2018-04-25 07:21:23 +09:00
Roman Stoliar
5b5a72c840
keep auto trait
2018-04-20 17:31:31 +03:00
csmoe
84d3659767
update rustc syntax 91.0.0
2018-04-08 22:22:11 +08:00
Seiichi Uchida
edcc7b69eb
Cargo update ( #2602 )
...
Update `rustc-ap-syntax` to 89.0.0 and fix up breaking changes.
2018-04-06 23:09:45 +09:00
Seiichi Uchida
fa80ddf876
Reorder impl items based on its kind
...
The ordering is defined as follows:
type < cosnt < macro < method
Items that are same kind will not be reordered: that is, the item
that an user has put first comes first.
2018-04-05 12:49:16 +09:00
Shotaro Yamada
56e10aa6e9
Fix typo
2018-04-01 22:29:26 +09:00
Shotaro Yamada
89200f40ff
Remove unnecessary [..]
s
2018-04-01 22:29:26 +09:00
Nick Cameron
ff9ab51617
Merge pull request #2550 from sinkuu/chars_count_index
...
Don't index a string with chars().count()/position()
2018-03-22 16:26:48 +13:00
Shotaro Yamada
4757321277
Don't index a string with chars().count()
2018-03-22 08:33:18 +09:00
Nick Cameron
50c95a074a
cargo fmt
2018-03-20 09:27:31 +13:00
Nick Cameron
a76d9b529a
format code and tests
2018-03-20 09:27:31 +13:00
Matthew McAllister
c5168405b0
Format attributes on block expressions
2018-03-14 01:16:19 +09:00
Seiichi Uchida
ccd134ed75
Add a test for #2497
...
Closes #2497 .
2018-03-12 07:54:12 +09:00
Seiichi Uchida
b077297179
Modify the placement of the opening brace of trait
...
Put the opening brace on the next line if
1. putting it one the current line exceeds max width.
2. trait bounds uses multiple lines.
2018-03-12 07:54:12 +09:00
Seiichi Uchida
f56039c7e5
Use rewrite_assign_rhs for rewriting bounds
2018-03-12 07:54:12 +09:00
Seiichi Uchida
6ba7c34433
Use Option<SeparatorTactic> over bool to control trailing comma
2018-03-09 14:07:43 +09:00
Seiichi Uchida
2a99d9704f
Use overflow::rewrite_with_angle_brackets to rewrite generics
2018-03-09 14:07:43 +09:00
Seiichi Uchida
ae629abc41
Add overflow module
...
This commit adds `overflow` module. This module provides two APIs.
`rewrite_with_parens` is basically the same as `rewrite_call_inner`.
`rewrite_with_angle_brackets` is used for rewriting generics and types.
2018-03-09 14:07:43 +09:00
Seiichi Uchida
71ca21fc23
Disallow combining parens and brackets in impl
2018-03-08 19:08:38 +09:00
Seiichi Uchida
5416c4df76
Modify code around ast::Visibility
...
`ast::Visibility` is changed to `codemap::Spanned` whose node is
`ast::VisibilityKind`. This commit fixes it.
Closes #2398 .
2018-03-06 19:47:28 +09:00
Nick Cameron
39301ae5f2
Go back to a non-workspace structure
...
Kinda reverts https://github.com/rust-lang-nursery/rustfmt/pull/2419
2018-03-02 14:58:23 +13:00
topecongiro
4af2aa3a9e
Create rustfmt_core crate
2018-02-07 22:48:05 +09:00
Nick Cameron
b7f01769f9
Merge branch 'master' into init-shorthand
2018-02-01 15:20:01 +13:00
Seiichi Uchida
c60d865b98
Put attributes and enum variants on different lines
2018-01-26 16:20:00 +09:00
Seiichi Uchida
154bf8e1af
Cargo fmt
2018-01-22 13:05:18 +09:00
Nick Cameron
74a957e80f
Merge pull request #2357 from topecongiro/issue-2342
...
Put attributes and struct fields on different line by default
2018-01-12 17:32:55 +13:00
Nick Cameron
b356fc06f7
Merge pull request #2352 from topecongiro/issue-2337
...
Break after colon if static item does not fit in a single line
2018-01-12 17:31:12 +13:00
Seiichi Uchida
2420d346c5
Put attributes and struct fields on different line
2018-01-11 16:57:12 +09:00
Seiichi Uchida
eaab51db2e
Break after colon if static item does not fit in a single line
2018-01-10 23:23:42 +09:00
Seiichi Uchida
cb0b366b38
Cargo fmt
2018-01-10 17:17:06 +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
c355f3854c
Use correct budget when rewriting generics of trait
2018-01-04 12:46:05 +09:00
topecongiro
12ddaf93e2
Remove trim_newlines()
...
We call `trim_newlines()` after the `trim()`ed buffer, which is unnecessary.
2018-01-02 13:04:39 +09:00
Seiichi Uchida
f523ec58ab
Do not give up rewriting struct field when attribute is long
2017-12-24 13:57:29 +09:00
Seiichi Uchida
939a6c5820
Get rid of GenericsArg wrapper type
...
`GenericsArg` is basically identical to `ast::GenericParam`.
Just use the latter.
2017-12-24 00:29:59 +09:00
Seiichi Uchida
1ef6bccea3
Cargo fmt
...
Run 'cargo fmt' with the following setting:
```
reorder_imports = true
reorder_imports_in_group = true
```
2017-12-24 00:28:58 +09:00
Bastian Köcher
fa67631b32
Fixes compilation with rust version 2017-12-21
2017-12-22 02:52:22 +01:00
topecongiro
1d8619d49a
Fix wrong indentation on type alias
...
Use rewrite_assign_rhs() when rewriting type alias.
2017-12-21 09:58:13 +09:00
topecongiro
3a98b5a5be
Format trait aliases
2017-12-15 13:47:52 +09:00
Seiichi Uchida
516f15aba1
Cargo clippy
2017-12-12 13:48:12 +09:00
Nick Cameron
fc52a4d33f
Merge pull request #2173 from topecongiro/assignment-with-100-chars
...
Assignment whose lhs has 100 chars
2017-12-11 17:04:41 +13:00
Nick Cameron
08022ec1a3
Merge pull request #2265 from topecongiro/issue-2262
...
Fix bugs related to closures
2017-12-11 09:00:56 +13:00
Seiichi Uchida
e3d2f2c2b1
Cargo fmt
2017-12-10 21:54:26 +09:00
topecongiro
5e6bb3edb0
Keep track of line number in visitor
2017-12-08 16:59:04 +09:00
Seiichi Uchida
3ebe054362
Replace into() on &str with to_owned()
2017-12-08 13:07:42 +09:00
Seiichi Uchida
c0eb8c3212
Add FmtVisitor::from_context()
2017-12-07 13:57:54 +09:00
Seiichi Uchida
7c4a84751f
Convert '&str' into 'String' whenever necessary
2017-12-07 13:57:52 +09:00
Seiichi Uchida
69a15b2eee
Update FmtVisitor::from_codemap()
2017-12-06 22:51:52 +09:00
Nick Cameron
b07e4339f0
Merge pull request #2221 from topecongiro/rfc/blank-lines
...
Keep vertical spaces between items or statements within range
2017-12-06 15:52:19 +13:00
Seiichi Uchida
026c716168
Cargo fmt
2017-12-03 11:38:16 +09:00
topecongiro
16184d3e16
Cargo fmt and update a test
2017-12-03 11:34:18 +09:00
Seiichi Uchida
89f27764ed
Cargo fmt and update tests
2017-12-02 17:45:39 +09:00
Nick Cameron
076bc2332f
Merge pull request #2213 from topecongiro/issue-2212
...
Format defualtness on specialized impl const
2017-12-01 12:17:10 +13:00
Nick Cameron
c18ba569df
Merge pull request #1889 from topecongiro/match-arm
...
Do not put if on the same line as match arm
2017-12-01 11:56:01 +13:00
Oliver Schneider
ae18c6064a
Run rustfmt
2017-11-30 15:04:19 +01:00
topecongiro
3b36371b78
Format defualtness on specialized impl const
2017-11-30 19:38:05 +09:00
topecongiro
22c9025027
Format source codes
2017-11-30 18:00:49 +09:00
Oliver Schneider
9667cc2484
Address clippy lints
2017-11-30 09:24:10 +01:00
topecongiro
8b53d7806c
Cargo fmt
2017-11-29 17:37:51 +09:00
topecongiro
940758b1bd
Cargo fmt
2017-11-27 21:00:27 +09:00
topecongiro
dff2ebba05
Remove FIXME
...
now is the time
2017-11-27 20:58:39 +09:00
topecongiro
5c81741733
Minor refactoring
2017-11-27 20:57:06 +09:00
topecongiro
261d325e15
Remove width of a trailing comma on variant
2017-11-27 20:54:55 +09:00
Nick Cameron
fcb48786c8
Merge pull request #2191 from topecongiro/issue-2190
...
Recover from failing to format variants even where there is no comment
2017-11-27 18:14:08 +13:00
topecongiro
d5c98008f0
Recover from failing to format variants even where there is no comment
2017-11-27 13:50:01 +09:00
Nick Cameron
677446e99d
Merge fn_empty_single_line and impl_empty_single_line into empty_item_single_line
2017-11-27 17:46:09 +13:00
Nick Cameron
86007e7d17
Remove where_density
and where_layout
options
...
There is a choice between block and visual indent for where clauses, plus the
single line option. I think these two are too fine-grained to be useful.
2017-11-24 21:08:24 +13:00
Nick Cameron
dd1fbca99a
Replace various small width heuristics with a single option
...
Closes #1984
2017-11-24 20:17:06 +13:00
Nick Cameron
20805acf42
Merge attributes_on_same_line_as_field
and attributes_on_same_line_as_variant
into same_line_attributes
2017-11-24 14:29:44 +13:00
Nick Cameron
179b3c59de
Remove legacy option fn_args_paren_newline
2017-11-24 13:27:14 +13:00
Nick Cameron
4f65124422
Remove legacy option fn_return_indent
2017-11-24 13:19:36 +13:00
topecongiro
59ebde26f7
Cargo fmt
2017-11-21 08:52:43 +09:00
Nick Cameron
f987946078
Merge pull request #2161 from topecongiro/issue-1807
...
Implement RFC style for match pattern
2017-11-20 14:51:53 +13:00
topecongiro
d5152fc8c6
Use choose_rhs() for the layout of multi-lined struct field
2017-11-18 15:45:58 +09:00
topecongiro
35466adbfe
Generalize ListItems to allow a separator other than comma
2017-11-16 17:43:36 +09:00
topecongiro
8ef54293e8
Force vertical layout for all variants if one of then use multiple lines
2017-11-16 16:02:01 +09:00
topecongiro
f7ef1f681c
Use rewrite_assign_rhs() when rewriting associated type
2017-11-16 11:31:09 +09:00
topecongiro
4cd2e6f39a
Generalize rewrite_assign_rhs()
2017-11-16 11:26:36 +09:00
topecongiro
bc543cce0b
Combine spaces_within_parens and spaces_within_brackets
2017-11-14 23:42:31 +09:00
topecongiro
babc479783
Use space_before_colon and space_after_colon
2017-11-14 23:25:36 +09:00
topecongiro
f8074b340d
Combine fn_brace_style and item_brace_style
2017-11-14 10:47:02 +09:00
topecongiro
04f09c9d85
Replace '*_indent' with 'indent_style' in src
2017-11-13 17:33:32 +09:00
topecongiro
6b8cd40d07
Format where clause on unit struct
2017-11-13 11:07:09 +09:00
topecongiro
687b26c688
Add BracePos
2017-11-13 11:06:53 +09:00
topecongiro
c485202907
Format generics on unit struct
2017-11-13 08:02:06 +09:00
Seiichi Uchida
4d28e148a5
Return None when there are comments around trait bounds
2017-11-10 21:21:53 +09:00
Seiichi Uchida
76f5bc06c4
Fix a typo
2017-11-10 21:21:06 +09:00
Nick Cameron
0c250d0e5d
Merge pull request #2128 from topecongiro/issue-2125
...
Wrap long single field tuple struct
2017-11-08 21:11:21 +13:00
topecongiro
9337760dd9
Refactor: use less vertical lines
2017-11-08 11:53:13 +09:00
topecongiro
19a3b0b5ca
Use struct prefix as a callee
2017-11-08 11:52:25 +09:00
topecongiro
30959bc16f
Cargo fmt
2017-11-08 08:25:42 +09:00
topecongiro
f39559fef0
Use accessors instead of destucting
2017-11-06 21:48:18 +09:00
topecongiro
082c001843
Add visit_static()
2017-11-06 13:52:25 +09:00
topecongiro
3b2b7f67ee
Add StructParts to reduce the number of args
2017-11-06 13:52:25 +09:00
topecongiro
318f9c89e0
Add StaticParts to reduce the number of args in rewrite_static()
2017-11-06 13:52:25 +09:00
topecongiro
8c6c15a096
Remove unused args from format_generics()
2017-11-06 13:52:25 +09:00
topecongiro
4e1a75a429
Collapse if-else
2017-11-06 13:52:25 +09:00
topecongiro
39ca7db7c8
Remove unnecessary String::from()
2017-11-06 13:52:25 +09:00
topecongiro
1a9d00bbef
Prefer ends_with() to chars().last().unwrap()
2017-11-06 13:52:25 +09:00
topecongiro
6c5ac5a9b3
Remove needless borrows
2017-11-06 13:52:25 +09:00