about summary refs log tree commit diff
path: root/src/expr.rs
AgeCommit message (Collapse)AuthorLines
2015-11-14Pass in whether an ast::Path is in an expression context.Eli Friedman-2/+2
This gets rid of a slightly nasty hack involving scanning the source expression for a ":".
2015-10-27Fix crash speculatively parsing macro arguments as expressions.Eli Friedman-2/+4
The problem is essentially that if we try to parse a token tree using a CodeMap different from the one the tree was originally parsed with, spans become nonsense. Since CodeMaps can't be cloned, we're basically forced to use the original ParseSess for additional parsing. Ideally, rustfmt would be a bit more clever and figure out how to parse macro arguments based on the definition of the macro itself, rather than just guessing that a particular token sequence looks like an expression, but this is good enough for now. Fixes #538.
2015-10-24Address some issues with multiline patterns in let statementsMarcus Klaas-4/+12
2015-10-24show rustfmt coverage!Ravi Shankar-2/+2
2015-10-23Bump match inner block indent a levelMarcus Klaas-5/+4
2015-10-21Improve handling of commas after match arms.Eli Friedman-5/+14
Fixes #507. Fixes #508.
2015-10-19Fix large block commentsMarcus Klaas-6/+2
2015-10-19Remove overflow indentationMarcus Klaas-6/+5
2015-10-19Format some patternsMarcus Klaas-25/+16
2015-10-18Merge pull request #479 from marcusklaas/moar-typesNick Cameron-21/+21
Format more type variants
2015-10-18Merge pull request #474 from marcusklaas/fn-indentNick Cameron-1/+1
Properly indent pub fns in extern blocks
2015-10-17Format more type variantsMarcus Klaas-21/+21
2015-10-16Properly indent pub fns in extern blocksMarcus Klaas-1/+1
2015-10-16Format vec! macro using bracketsMarcus Klaas-2/+2
2015-10-16Remove unsafe push and pop variantsMarcus Klaas-2/+0
2015-10-15Force semicolons after break/continue/return. Remove after blocks.Marcus Klaas-1/+1
2015-10-13added semicolons for return statementsGaurav Saxena-1/+1
2015-10-12Use visual block indentation for array literalsMarcus Klaas-2/+4
2015-10-10Fix Build to Compile with 1.5.0-nightly (87cd2c082)Will Speak-1/+1
There was an extra, unused, paramter int he match arm which causes an error when compiling with the latest nightly.
2015-10-08Try "overflowing" the final function argument when it's a closureMarcus Klaas-26/+83
This means that we try formatting the last argument of a function call with block indentation instead of visual indentation when it is a closure and its first line fits on the same line as the first arguments.
2015-10-06Merge pull request #404 from marcusklaas/rewrite-list-fmtMarcus Klaas de Vries-72/+53
List formatting refactoring
2015-10-06Increase default function call width limitMarcus Klaas-40/+14
2015-10-04Make listItem contain optionMarcus Klaas-32/+12
2015-10-04Split ListTactic decision logic from write_listMarcus Klaas-29/+56
2015-10-02Unify pair formatting codeMarcus Klaas-115/+43
2015-10-02Format repeated element array literalsMarcus Klaas-2/+36
2015-10-02Format rustfmt's own indicesMarcus Klaas-2/+2
2015-10-02Format indicesMarcus Klaas-4/+36
2015-10-02Format type castsMarcus Klaas-2/+36
2015-09-27Prevent arithmetic overflow handling match arm commentsMarcus Klaas-6/+4
2015-09-27Merge pull request #370 from marcusklaas/match-arm-deliningMarcus Klaas de Vries-31/+56
Improve heuristics for match arm body placement
2015-09-27Add extra tests for match arm placementMarcus Klaas-17/+11
2015-09-26Fix match arm indentation bugMarcus Klaas-18/+21
2015-09-26Improve heuristics for match arm body placementMarcus Klaas-20/+48
2015-09-26Use a width heuristic for struct lits.Nick Cameron-1/+5
Closes #123
2015-09-26rebasing changes and address review commentNick Cameron-2/+8
2015-09-26Changes to source formattingNick Cameron-12/+41
2015-09-26Merge pull request #362 from marcusklaas/rewrite-stringNick Cameron-15/+27
Make rewrite_string return `Option<String>`
2015-09-25Use the maximum available width in struct formattingMarcus Klaas-3/+4
Previously, we'd use an approximation for the maximum width since the configuration wasn't available in `write_list`.
2015-09-25Adjust for changed representation of box expressions in ASTMarcus Klaas-2/+4
2015-09-25Make rewrite_string return `Option<String>`Marcus Klaas-15/+27
2015-09-24Add support for formatting AddrOf (unary "&").Eli Friedman-7/+19
2015-09-24Merge pull request #358 from eefriedman/rewrite-returnNick Cameron-5/+25
Add support for formatting "return" expressions.
2015-09-23Add support for formatting "return" expressions.Eli Friedman-5/+17
Fixes #303.
2015-09-23Exhaustively enumerate expressions in expression rewriting.Eli Friedman-1/+9
2015-09-24fix for #355 and test casesScyptnex-1/+5
2015-09-24Fixes #339 and #272Scyptnex-44/+72
2015-09-22Add tests, reformat exprManish Goregaokar-3/+10
2015-09-21Handle comments in match better (fixes #344)Manish Goregaokar-6/+20
2015-09-20Fix struct overflowsMarcus Klaas-10/+13