rust/src
Nick Cameron a4cdb68925 Improve formatting of series of binop expressions
This commit changes the handling of binops (and potentially other pairs), where
the expressions are logically a list, e.g., `a + b + c`. It makes the single
line vs multi-line approaches explicit and introduces a lowering step.

This improves formatting in a number of places, mostly improving consistency of
formatting with very short sub-expressions, but also some weird indentation.

Closes #2802
2018-07-12 21:37:28 +12:00
..
bin Fix help for --help=file-lines 2018-07-05 22:50:23 -07:00
cargo-fmt Fix tests 2018-06-05 20:58:02 +12:00
config Format async closure 2018-07-09 23:20:53 +09:00
format-diff TODO -> FIXME 2018-06-22 14:42:27 +12:00
git-rustfmt Remove format_and_emit_report from the API 2018-05-21 15:09:17 +12:00
test warn on use of default value for an option 2018-06-30 17:03:18 +02:00
attr.rs Apply short function call heuristic to attributes 2018-06-26 15:18:17 +12:00
chains.rs Fix compile errors from breaking changes in libsyntax 2018-06-25 15:24:00 +09:00
checkstyle.rs documentation 2018-05-21 15:54:56 +12:00
closures.rs Format async closure 2018-07-09 23:20:53 +09:00
codemap.rs format code and tests 2018-03-20 09:27:31 +13:00
comment.rs Trim custom comment prefix even when we failed to format code block 2018-06-05 15:58:14 +09:00
expr.rs Improve formatting of series of binop expressions 2018-07-12 21:37:28 +12:00
filemap.rs TODO -> FIXME 2018-06-22 14:42:27 +12:00
imports.rs Handle raw identifiers 2018-06-25 23:36:45 +09:00
issues.rs Don't index a string with chars().count() 2018-03-22 08:33:18 +09:00
items.rs Fix span bug when searching for the closing paren 2018-06-30 19:21:15 +09:00
lib.rs Move pair handling to its own module 2018-07-12 21:37:28 +12:00
lists.rs Refactor and fixup attribute formatting 2018-06-26 15:18:17 +12:00
macros.rs Return the trimmed original snippet when formatting macro def failed 2018-07-01 09:59:53 +09:00
matches.rs Flatten multiple empty blocks at once 2018-07-01 10:51:36 +09:00
missed_spans.rs TODO -> FIXME 2018-06-22 14:42:27 +12:00
modules.rs Use our own FileName struct rather than exporting libsyntax's 2018-05-21 12:08:39 +12:00
overflow.rs Avoid panicking on deeply nested expressions 2018-07-01 10:46:32 +09:00
pairs.rs Improve formatting of series of binop expressions 2018-07-12 21:37:28 +12:00
patterns.rs Move pair handling to its own module 2018-07-12 21:37:28 +12:00
reorder.rs Handle raw identifiers 2018-06-25 23:36:45 +09:00
rewrite.rs Set the flag in RewriteContext when rewriting macro call failed 2018-06-07 12:32:10 +09:00
rustfmt_diff.rs Replace use_colored_tty with iatty crate 2018-05-21 15:32:27 +12:00
shape.rs Refactor and fixup attribute formatting 2018-06-26 15:18:17 +12:00
spanned.rs Fix compile errors from breaking changes in libsyntax 2018-06-25 15:24:00 +09:00
string.rs Seperate and optimize grapheme conditions 2018-05-24 21:32:01 +02:00
types.rs Move pair handling to its own module 2018-07-12 21:37:28 +12:00
utils.rs Handle raw identifiers 2018-06-25 23:36:45 +09:00
vertical.rs Handle raw identifiers 2018-06-25 23:36:45 +09:00
visitor.rs Fix compile errors from breaking changes 2018-06-28 16:26:10 +09:00