sinkuu
a3c63fdef9
Run clippy
2016-08-29 08:57:27 +09:00
Nick Cameron
0087306761
Merge pull request #1016 from rust-lang-nursery/try-double-indent
...
Treat chains with just expr? specially.
2016-06-01 12:28:36 +01:00
Marcus Klaas
98c0570a28
Format non-statement if-else expressions on a single line
2016-05-29 17:58:38 +02:00
Nick Cameron
bbb6038b92
Treat chains with just expr? specially.
...
Fixes #1004
2016-05-29 09:32:48 +01:00
Nick Cameron
d6bcfceb7e
Don't put a newline before ?
when it is the second sub-expression in a chain ( #1012 )
...
Fixes #1003
2016-05-27 10:33:19 +02:00
Marcus Klaas
cd158cecc8
Add try macro to try shorthand conversion tests
2016-05-12 21:15:06 +02:00
Marcus Klaas
ee7b5805fc
Format try shorthand
2016-05-09 20:07:59 +02:00
Nick Cameron
f2105d382f
Fix for stable
2016-04-26 14:27:13 +12:00
Nick Cameron
19fa5c9ebb
Update docs (and a function name)
2016-04-22 19:26:42 +12:00
Nick Cameron
a9c3108c9c
Change defaults and update tests and source
...
New defaults are `Tabbed` for `chain_indent` and `chain_base_indent`, and `5` for `closure_block_indent_threshold`.
2016-04-22 19:18:48 +12:00
Nick Cameron
9761cf71d8
Tests
2016-04-22 18:53:39 +12:00
Nick Cameron
95ff52f06f
Tabbed/Inherit indent for chains works even without a newline after first item.
2016-04-22 18:41:38 +12:00
Nick Cameron
3d46532e72
refactor and document the chain reformatting code
2016-04-22 14:47:00 +12:00
Nick Cameron
9d8ce54428
Don't apply the function args heuristic to tuple lits.
...
Closes #450
Closes #510
2016-03-14 20:51:06 +13:00
Kamal Marhubi
589dabda2f
deps: Update syntex_syntax to 0.29.1
2016-03-02 13:08:21 -05:00
Marcus Klaas
2069abcca4
Reduce dependency on pprust
2015-12-25 20:59:46 +01:00
Seo Sanghyeon
2b11d84119
Apply Clippy
2015-11-25 15:39:15 +09:00
Markus Westerlind
465662a691
Fix long field accesses not being broken onto separate lines
...
Fixes #512
2015-11-21 01:05:31 +01:00
Marcus Klaas
7b0cceafee
Force chains to adhere to restrictions
2015-11-20 21:09:34 +01:00
Marcus Klaas
6e1f77664d
Unwrap match arms that are simple blocks
2015-11-20 21:05:18 +01:00
Thorben Kroeger
d4be6a43e9
new config 'chain_indent'
2015-11-14 21:50:40 +01:00
Marcus Klaas
c93c771e71
Fix span issue with generic method calls
2015-11-13 14:53:34 +01:00
Nick Cameron
45bcf59bde
Merge pull request #528 from marcusklaas/chain-idempotence
...
Restore idempotence for chain formatting
2015-10-24 11:14:24 +13:00
Alex Crichton
36abfe5dc2
Remove usage of many unstable features
...
This removes usage of:
* PathExt
* split_last
* split_last_mut
* catch_panic
The catch_panic one was a little tricky as the ident interner needed to be
cloned across threads (a little unsafely), but it should otherwise be good to
go.
2015-10-23 13:46:14 -07:00
Marcus Klaas
0bb979bb85
Restore idempotence for chain formatting
2015-10-23 20:37:45 +02:00
Marcus Klaas
2d267b16d1
Deal with floating links in chains
2015-10-22 22:30:01 +02:00
Marcus Klaas
dba08bf898
Indent uncontinued chains to block level
2015-10-14 19:41:29 +02:00
Nick Cameron
99d71a164a
Changes to source formatting
2015-09-26 13:58:12 +12:00
Eli Friedman
19e887c309
Add support for formatting AddrOf (unary "&").
2015-09-24 01:13:57 -07:00
Pavel Sountsov
03e1b27826
Add Indent::none(), remove make_indent.
2015-09-19 10:36:45 -07:00
Pavel Sountsov
d4108a3029
Initial implementation of hard tab indentation.
2015-09-19 10:36:45 -07:00
Marcus Klaas
03c660633f
Refine chain breaking heuristics
...
Don't make a single line chain when it is was multi line in the source; allow overflow of the last chain element onto the next lines without breaking the chain.
2015-09-11 00:53:01 +02:00
Marcus Klaas
a9814149c9
Align dots in chained expressions
2015-09-11 00:53:01 +02:00
Marcus Klaas
8e471ece31
Add some tests for match blocks
2015-09-11 00:53:01 +02:00
Marcus Klaas
abe8e7de99
Add tests for chain expressions
2015-09-11 00:53:01 +02:00
Marcus Klaas
749a9689be
Break chains that don't start with path expressions
2015-09-11 00:52:57 +02:00
Marcus Klaas
659c9b9037
Update indentation heuristics for single arg functions
2015-09-11 00:52:20 +02:00
Marcus Klaas
c680bb4030
Implement basic chain formatting
2015-09-11 00:52:16 +02:00