Commit Graph

505 Commits

Author SHA1 Message Date
Marcus Klaas de Vries
fa67e0359a Merge pull request #334 from marcusklaas/sparse-mods
Place the closing brace of an inline mod on a new line
2015-09-21 19:42:36 +02:00
Manish Goregaokar
abdb693922 Handle comments in match better (fixes #344) 2015-09-21 17:48:35 +05:30
Nick Cameron
b7866d0e53 Merge pull request #336 from marcusklaas/struct-overflow
Fix struct overflows
2015-09-21 10:34:36 +12:00
Marcus Klaas
5ee6304d8d Fix struct overflows 2015-09-20 18:45:25 +02:00
Marcus Klaas de Vries
0952d7354e Merge pull request #335 from Kha/struct-lit-base
Fix negative overflow and missing '..' on struct lit base exprs
2015-09-20 17:42:23 +02:00
Sebastian Ullrich
9bd502ad54 Fix negative overflow and missing '..' on struct lit base exprs 2015-09-20 15:47:21 +02:00
Marcus Klaas
f8e74bfa2c Place the closing brace of an inline mod on a new line 2015-09-20 14:22:12 +02:00
Marcus Klaas de Vries
ce2c4f6be6 Merge pull request #290 from SiegeLord/tabs
Initial implementation of hard tab indentation.
2015-09-20 12:27:16 +02:00
Pavel Sountsov
01bdcd0014 Remove unnecessary config parameter from format_missing_with_indent. 2015-09-19 10:44:28 -07:00
Pavel Sountsov
05c8c28935 Add some tests for hard tab mode. 2015-09-19 10:36:46 -07:00
Pavel Sountsov
620650219e Use the block_indent inside visit_expr.
This seems to pass all the tests and greatly improves the formatting output
when using hard tabs.
2015-09-19 10:36:46 -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 de Vries
4e1fff8710 Merge pull request #332 from Kha/variant_no_vis
rustc update: Remove variant visibility
2015-09-19 19:19:34 +02:00
Sebastian Ullrich
3da7adbc3f rustc update: Remove variant visibility
https://github.com/rust-lang/rust/pull/28440
2015-09-19 17:46:25 +02:00
Marcus Klaas de Vries
fa5772e9bb Merge pull request #326 from marcusklaas/interface-refactor
Refactor rustfmt's interface and test code
2015-09-18 22:37:09 +02:00
Marcus Klaas
e72d488281 Refactor test code
No longer use callbacks or thread::catch_panic; reduce stdout spew; guard against rustfmt breaking the column limit.
2015-09-18 22:34:46 +02:00
Marcus Klaas
110f7206e6 Split formatting function from side effects
This makes rustfmt more usable as a library.
2015-09-18 22:31:33 +02:00
cassiersg
9c5dc29416 Merge pull request #314 from alobb/configDocumentation
Fixed https://github.com/nrc/rustfmt/issues/291
2015-09-17 23:13:25 +02:00
cassiersg
ce64dec90c Merge pull request #330 from marcusklaas/fn-no-return
Add regression test for non-returning functions
2015-09-17 23:09:09 +02:00
Marcus Klaas
ad7af22278 Add regression test for non-returning functions 2015-09-17 21:35:56 +02:00
Nick Cameron
7c6f9c5edb Merge pull request #324 from marcusklaas/macro-uses
Format macro invocations
2015-09-17 10:46:19 +12:00
Marcus Klaas
f751356910 Format macro invocations 2015-09-16 20:26:14 +02:00
Marcus Klaas de Vries
d4d8a8cc87 Merge pull request #323 from nrc/unsafe-closure
Preserve unsafe blocks in closures
2015-09-16 20:02:30 +02:00
Aaron Lobb
07f7926bc2 Added help string for chains_overflow_last config parameter 2015-09-15 21:15:46 -07:00
Nick Cameron
e4cca21a10 Preserve unsafe blocks in closures
Fixes #321
2015-09-15 17:47:18 +12:00
Nick Cameron
ff02953a02 Merge pull request #318 from nrc/shr_test
Some random tidying up
2015-09-15 11:49:35 +12:00
Nick Cameron
a29023a191 Remove a few unnecessary rustfmt_skips 2015-09-15 11:46:27 +12:00
Nick Cameron
99ffb5af99 Add a test for dodgy spans around >>
Closes #242
2015-09-15 11:43:44 +12:00
Aaron Lobb
d773580715 Changed ConfigType trait to only return a string of variants, rather than a vec 2015-09-14 13:43:55 -07:00
Aaron Lobb
cd9e9b5db0 Merged config imports 2015-09-14 13:06:09 -07:00
Nick Cameron
7057f40e5d Merge pull request #316 from marcusklaas/diff-upgrade
Bump diff.rs version
2015-09-15 06:32:01 +12:00
Marcus Klaas
da3d2f57da Bump diff.rs version
This should make the computation of diffs quite a bit faster, which is particularly noticable in tests.
2015-09-14 20:22:07 +02:00
cassiersg
45dedc84a7 Merge pull request #315 from alobb/defaultTomlRemoval
https://github.com/nrc/rustfmt/issues/304
2015-09-14 16:53:47 +02:00
Aaron Lobb
33109a78dc https://github.com/nrc/rustfmt/issues/304 Removed reference to default.toml 2015-09-14 00:38:32 -07:00
Aaron Lobb
8b808de6ff Fixed https://github.com/nrc/rustfmt/issues/291; added output to --help runtime option with possible config values 2015-09-14 00:29:15 -07:00
Nick Cameron
4738d284f2 Merge pull request #309 from marcusklaas/array-literals
Format array literals
2015-09-13 09:20:37 +12:00
Nick Cameron
4debd4d302 Merge pull request #312 from marcusklaas/closure-fix
Prevent generation of bogus comment in some function calls
2015-09-13 09:17:43 +12:00
Marcus Klaas
ffa7e8d599 Prevent generation of bogus comment in some function calls
This would happen when the callee contained parentheses.
2015-09-12 14:31:51 +02:00
Marcus Klaas
7deee6daf5 Format array literals 2015-09-12 00:06:17 +02:00
Nick Cameron
764793b2e6 Merge pull request #307 from marcusklaas/function-arg-ty
Rewrite types in function arguments
2015-09-12 10:01:53 +12:00
Nick Cameron
3fdbb3b97c Merge pull request #310 from marcusklaas/continue-reg-test
Add regression test for bad continue span
2015-09-12 09:52:10 +12:00
Marcus Klaas
436f8663e3 Add regression test for bad continue span 2015-09-11 23:32:13 +02:00
Marcus Klaas
623d6c972a Rewrite types in function arguments 2015-09-11 12:32:34 +02:00
Marcus Klaas de Vries
0b7b3c8725 Merge pull request #216 from marcusklaas/format-fields
WIP: Format expression chains
2015-09-11 00:56:14 +02:00
Marcus Klaas
7f576b0602 General cleanup after rebase 2015-09-11 00:53:21 +02: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
48d17f54d3 Rebase onto master 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
95ef9dedb4 Escape quotes in string literals 2015-09-11 00:53:01 +02:00