about summary refs log tree commit diff
path: root/src/expr.rs
AgeCommit message (Collapse)AuthorLines
2017-05-05Block format control flow discriminant expressions and binopsNick Cameron-7/+17
Fixes #1450 Adds control_style option
2017-05-04Check format failures explicitly in visit_blocktopecongiro-18/+6
2017-05-03Use block indent when visual indent failed inside closure blocktopecongiro-9/+27
2017-05-02Use block when arm exceeds max_widthSeiichi Uchida-1/+3
2017-05-02Merge pull request #1487 from topecongiro/issue1470Nick Cameron-3/+5
Use block indent when visual indent exceeds max_width
2017-05-02Merge pull request #1454 from topecongiro/matchNick Cameron-8/+10
Format nested mathces properly.
2017-05-01Use block indent when visual indent exceeds max_widthSeiichi Uchida-3/+5
2017-05-01Merge pull request #1469 from topecongiro/bug/chainsNick Cameron-13/+4
Remove a bug when calculating the length of the chain
2017-04-24Format source codestopecongiro-13/+4
2017-04-17Prohibit long return val from 'rewrite_closure_block'topecongiro-5/+8
2017-04-15Format source codestopecongiro-9/+9
2017-04-15Add heuristic choosing block or visual indent for unary op based on spantopecongiro-8/+27
2017-04-15Use offset instead of indent for match armtopecongiro-3/+2
2017-04-06Fix a bug with overlong function callsNick Cameron-2/+11
2017-04-06Implement a max array widthNick Cameron-2/+7
Fixes #1421
2017-04-04eliminate nested matchRyan1729-5/+3
2017-04-03fix bug by adding boolean argumentRyan1729-8/+21
Signed-off-by: Ryan1729 <Ryan1729@gmail.com>
2017-03-29Fix a typotopecongiro-3/+4
2017-03-28Remove duplicate definitionstopecongiro-8/+4
This commit removes duplicated definitions of `type_annotation_separator` and `type_bound_colon`.
2017-03-28test falloutNick Cameron-58/+15
2017-03-28fallout - source reformattingNick Cameron-60/+148
2017-03-28Source formatting falloutNick Cameron-10/+17
2017-03-28Support block indent for function callsNick Cameron-21/+35
Uses the `fn_call_style` option. Fixes #1358
2017-03-26Add indent_match_arms option (#1404)C4K3-1/+6
Makes it optional whether to indent arms in match expressions. Setting this to false may be desirable for people wishing to avoid double-indents, in that if the match arm is a block, the block will cause an extra indentation level, and if it isn't a block but just a single line, it's still easy to see the logic at a glance. This style is preferred in certain other languages with switch statements, e.g. Linux style C and the most common Java style.
2017-03-22Test and source falloutNick Cameron-12/+35
2017-03-22Block indenting for struct lit patternsNick Cameron-100/+60
Now follows struct_lit_style (and most other struct_lit_ options). Required a fair bit of refactoring and bug fixes. Fixes #1311
2017-03-20Unify a bunch of option types into IndentStyleNick Cameron-11/+11
2017-03-20Remove FnArgLayoutStyle::BlockAlwaysNick Cameron-3/+1
2017-03-20Block formatting for arraysNick Cameron-11/+49
Fixes #1331
2017-03-07Treat new blocks like existing ones in closuresNick Cameron-1/+1
Fixes #1355
2017-03-07Formatting falloutNick Cameron-44/+51
Also fixes a minor bug when we break a line after `if` and used to leave a trailing space
2017-03-02Fix failing testNick Cameron-1/+2
2017-03-02Fix trailing comma testsNick Cameron-3/+3
2017-03-02Merge branch 'master' of github.com:rust-lang-nursery/rustfmtNick Cameron-9/+21
2017-03-01Fix wrap_match_arms resulting in a missing comma (#1307)Marcus Ball-9/+21
* Fix match arms missing comma with "wrap_match_arms = false" * remove assert; use body_suffix for comma * basic test case for issue 1127
2017-02-24Coalesce trailing comma optionsNick Cameron-7/+1
2017-02-24Fix width bug for long patterns in match armsNick Cameron-14/+5
Fixes failing test
2017-02-23more falloutNick Cameron-9/+10
2017-02-23FalloutNick Cameron-147/+147
2017-02-23test falloutNick Cameron-1/+1
2017-02-23remove some chain optionsNick Cameron-1/+1
2017-02-23Remove indent from context and only use ShapeNick Cameron-4/+4
2017-02-21WIPNick Cameron-221/+190
2017-02-13Support field-init-shorthand (#1308)sinkuu-16/+21
2017-01-31Handle multiline condition in let if else (fixes #1239)Trevor Spiteri-1/+10
2017-01-31Refactor indent and width into Shape structNick Cameron-357/+306
2017-01-27Some debugging stuffNick Cameron-0/+2
2017-01-27Make string lit formatting fallibleNick Cameron-9/+12
This allows expressions containing string lits to wrap their content Fixes #1282
2017-01-20Update to latest SyntexNick Cameron-4/+10
As a side-effect of the Path changes, we are now a bit more aggressive about normalising paths.
2017-01-17Fix bug in identifying commentsNick Cameron-2/+2
Fixes 1233