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