Commit Graph

584 Commits

Author SHA1 Message Date
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