Commit graph

26 commits

Author SHA1 Message Date
Nick Cameron
d3eba76e4d update Serde, etc.
Lots of changes to how closures work
2016-11-21 11:02:18 +13:00
Marcus Klaas
5fc9fa3770 Condense suffix strings of simple wildcards in patterns 2016-11-07 21:38:20 +01:00
Mikko Rantanen
4b1c669037 Add spaces_within_square_brackets config option. (#1191)
* Add spaces_within_square_brackets config option.

Enabling the config enforces spaces within various array/slice brackets.

* Fixed budget-calculations for [] spacing
2016-10-18 09:09:49 +13:00
Mikko Rantanen
7be202fa3c Add support for spaces_within_parens config (#1187)
* Add support for spaces_within_parens config

* Changes based on review comments
2016-10-13 14:34:08 +13:00
Nick Cameron
4418fab4f2 Update to latest Syntex
+ Cargo update
+ 0.6.2 release
2016-09-16 15:28:02 +12:00
sinkuu
bf078566d7 Fix #1021: Handle .. in tuple / tuple struct patterns 2016-09-09 19:56:34 +09:00
sinkuu
a3c63fdef9 Run clippy 2016-08-29 08:57:27 +09:00
Kamal Marhubi
bd10af127e utils: Move codemap related utilities to a dedicated module
This commit adds a `codemap` module, and moves the `CodemapSpanUtils`
added in #857 to it. This is preparation for adding more `Codemap`
specific utilities.

Refs #434
2016-05-31 00:49:26 +02:00
Nick Cameron
5436977bd5 Merge pull request #1017 from marcusklaas/tweak-if-else
Format non-statement if-else expressions on a single line
2016-05-31 01:57:29 +12:00
Kamal Marhubi
120e1a0b51 deps: Update syntex_syntax to 0.33
This bump brings syntex_syntax support for `..` in tuple and tuple
struct patterns, which come from RFC 1492:
  https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md

These new patterns are not properly handled in this PR; instead #1021
tracks supporting them.

Refs #1021
2016-05-30 14:53:04 +02:00
Marcus Klaas
98c0570a28 Format non-statement if-else expressions on a single line 2016-05-29 17:58:38 +02:00
Nick Cameron
0fae34dfa1 Don't ignore universal quantification in function types
Fixes #1006
2016-05-27 15:09:04 -07:00
Marcus Klaas
eae2921e14 Bootstrap it. Hard. 2016-05-12 21:50:43 +02: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
Marcus Klaas
63f0fc9641 Fix off-by-one error in pattern formatting 2016-04-16 22:42:52 +02:00
Nick Cameron
da65090050 Merge pull request #857 from kamalmarhubi/codemap-ext
utils: Add CodeMapExt extension trait for span_* methods
2016-03-14 18:00:51 +13:00
Kamal Marhubi
d82d9fc808 utils: Add CodeMapSpanUtils trait for span_* methods
This commit adds a CodeMapSpanUtils extension trait on CodeMap, and
moves some functions to methods there:
  - span_after
  - span_after_last
  - span_before

This better reflects them being lookup methods on the codemap.
2016-03-13 18:14:07 -04:00
Kamal Marhubi
589dabda2f deps: Update syntex_syntax to 0.29.1 2016-03-02 13:08:21 -05:00
Nick Cameron
160eb73baa reviewer changes 2016-02-15 10:07:19 +13:00
Nick Cameron
d86cfb357a Format all patterns (well, except macros)
Fixes #18
Fixes #672
2016-02-12 14:59:13 +13:00
Marcus Klaas
97e4e7e5ba Fixed named arguments in bare function types 2015-12-06 01:11:26 +01:00
Marcus Klaas
6e1f77664d Unwrap match arms that are simple blocks 2015-11-20 21:05:18 +01:00
Nick Cameron
56a765ef05 Rustup 2015-11-16 14:16:46 +13:00
Eli Friedman
2fff041b43 Pass in whether an ast::Path is in an expression context.
This gets rid of a slightly nasty hack involving scanning the source
expression for a ":".
2015-11-14 13:54:57 -08:00
Marcus Klaas
ae5d7e6ba4 Fix indentation for enum-style patterns 2015-10-23 20:44:46 +02:00
Marcus Klaas
ca023ba9b7 Format some patterns 2015-10-19 20:15:36 +02:00