Nick Cameron
803d000ed3
Merge pull request #2900 from topecongiro/combine-attrs
...
Combine function-like attributes
2018-08-06 19:37:05 +12:00
Nick Cameron
e4d560b914
Merge pull request #2897 from topecongiro/issue-2896
...
Ignore comment in wrap_str
2018-08-06 19:36:03 +12:00
Nick Cameron
8cd6633499
Merge pull request #2892 from topecongiro/issue-2884
...
Explicitly handle semicolon after the item in statement position
2018-08-06 19:34:44 +12:00
Nick Cameron
f6a76c443e
Merge pull request #2890 from topecongiro/use-builder-pattern-for-ListFormatting
...
Use builder pattern for ListFormatting
2018-08-06 19:34:08 +12:00
Seiichi Uchida
b1c241ea72
Combine list-like attributes
2018-08-06 08:10:19 +09:00
Seiichi Uchida
4bbfe0829d
Fix chain with many try operators
2018-08-05 21:03:45 +09:00
Seiichi Uchida
e6d814c423
Put comment between chain elements on its original position
2018-08-05 19:55:22 +09:00
Seiichi Uchida
24fccdc45c
Factor out functions that extract comments around items
2018-08-05 19:55:03 +09:00
Seiichi Uchida
3ec6de1de8
Add FIXME comment
2018-08-05 15:06:05 +09:00
Seiichi Uchida
49945a14f7
Format
2018-08-05 15:04:48 +09:00
Seiichi Uchida
9e113b5bab
Do not handle comment when converting try
...
As we get faulty span.
2018-08-05 15:03:36 +09:00
Seiichi Uchida
75967f0da2
Add a space before comment that comes after a block-like chain item
2018-08-05 14:37:13 +09:00
Seiichi Uchida
91c058a516
Veto putting a chain with comment in a single line
2018-08-05 14:34:34 +09:00
Seiichi Uchida
caefd218c9
Do not combine short parent and comment
2018-08-05 14:28:20 +09:00
Seiichi Uchida
e6bde923f5
Format comment between chain elements
2018-08-05 14:28:10 +09:00
Seiichi Uchida
844e878d12
Add Comment to ChainItemKind
2018-08-05 14:27:47 +09:00
Seiichi Uchida
fc3ea494ac
Make children list in-order
...
instead of working on reveresed list.
2018-08-05 13:54:28 +09:00
Seiichi Uchida
c480309aad
Get correct span
2018-08-05 13:35:33 +09:00
Seiichi Uchida
c20bf454c9
Add Span field to ChainItem
2018-08-05 13:02:24 +09:00
Seiichi Uchida
c5b36f53ae
Normalize chain elements
...
Instead of passing around a list of subexpressions ([`a`, `a.b`, `a.b.c`]),
we now use a list of chain element ([`a`, `.b`, `.c`]). This should make it
easier to extract comments between chain elements.
2018-08-05 11:45:05 +09:00
Seiichi Uchida
2eeb366311
Ignore comment in wrap_str
2018-08-05 10:50:43 +09:00
Seiichi Uchida
2eca09e438
Fix parsing '#'-hiding of rustdoc
2018-08-05 08:44:20 +09:00
Seiichi Uchida
d96e3ca604
Explicitly handle semicolon after the item in statement position
2018-08-04 09:59:38 +09:00
Seiichi Uchida
1a6df18d6f
Remove pub(self)
2018-08-04 08:47:48 +09:00
Seiichi Uchida
e5c79bb26b
Fix imports
2018-08-03 22:14:45 +09:00
Seiichi Uchida
024c03e81b
Use builder pattern for ListFormatting
2018-08-03 22:13:20 +09:00
Seiichi Uchida
1928ae78a2
Regard digits as an upper case character
2018-08-03 20:06:36 +09:00
Nick Cameron
5ed600cbeb
Merge pull request #2879 from RReverser/master
...
Fix check for unstable features
2018-08-01 10:28:49 +12:00
Nick Cameron
df2e8bb594
Merge pull request #2873 from aloucks/auto-detect-newline-style
...
Auto-detect newline style by default
2018-08-01 10:06:31 +12:00
Ingvar Stepanyan
593a5c40a4
Use is_nightly helper instead of duplicate code
2018-07-31 11:53:22 +01:00
Ingvar Stepanyan
c25deef110
Fix check for unstable features
...
These features are registered only on Nightly and so matches.opt_present panics when it's called without the is_nightly guard.
2018-07-31 11:50:09 +01:00
Aaron Loucks
dab572e0b0
Increase capacity for newline conversion buffer
2018-07-30 23:19:46 -04:00
Nick Cameron
ca6b360c8a
Emit 0 exit code for --version and similar operations
...
Fixes #2878
2018-07-31 13:41:49 +12:00
Nick Cameron
d43874113e
Warn the user if using an unstable option without --unstable-options
...
Fixes #2796
2018-07-31 10:02:32 +12:00
Nick Cameron
3c20d8a9e6
Merge pull request #2874 from cavedweller/master
...
Format Async block and async fn
2018-07-31 08:52:07 +12: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
Aaron Loucks
6ff2a5e0f3
Auto-detect newline style by default
2018-07-29 10:12:31 -04:00
Andrew Audibert
f121b1a3a9
Support raw identifiers in struct expressions
2018-07-28 19:40:52 -07:00
Nick Cameron
69ad879d52
Merge pull request #2864 from topecongiro/issue-2863
...
Modify the rule for reordering impl items
2018-07-27 16:24:46 +12:00
Nick Cameron
814f6339b4
Merge pull request #2862 from topecongiro/issue-2852
...
Preserve parens in trait bounds
2018-07-27 16:24:11 +12: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
e6255ca3de
Preserve parens in trait bounds
2018-07-25 18:27:25 +09:00
Nick Cameron
8ff2836eaf
Merge pull request #2861 from topecongiro/issue-2859
...
Put lifetimes after trait when they gets orphaned
2018-07-25 21:22:25 +12:00
Seiichi Uchida
339fa20973
Veto converting delimiters inside nested macro
2018-07-25 08:58:37 +09:00
Seiichi Uchida
6cecdd681f
Put lifetimes after trait when they gets orphaned
2018-07-25 08:44:32 +09:00
Seiichi Uchida
975b3753ba
Keep the inside macro context in nested macro call
2018-07-25 07:15:33 +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