]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMerge pull request #189 from nrc/match
Nick Cameron [Wed, 19 Aug 2015 20:20:43 +0000 (08:20 +1200)]
Merge pull request #189 from nrc/match

match expressions

8 years agoRe-jig binop formatting
Nick Cameron [Wed, 19 Aug 2015 03:15:54 +0000 (15:15 +1200)]
Re-jig binop formatting

and misc other fixes from the reviews.

8 years agoreformatting/rebasing
Nick Cameron [Sun, 16 Aug 2015 21:55:26 +0000 (09:55 +1200)]
reformatting/rebasing

8 years agoHandle span error with `continue`
Nick Cameron [Sun, 16 Aug 2015 04:43:59 +0000 (16:43 +1200)]
Handle span error with `continue`

This should be properly addressed by #184, but requires a change to the rustc parser, so this patch just works around the issue.

8 years agoRewrite match expressions (continued).
Nick Cameron [Sun, 16 Aug 2015 21:41:45 +0000 (09:41 +1200)]
Rewrite match expressions (continued).

8 years agoFormatting
Nick Cameron [Sun, 16 Aug 2015 03:58:17 +0000 (15:58 +1200)]
Formatting

8 years agoAllow `{}` to remain.
Nick Cameron [Sun, 16 Aug 2015 04:13:55 +0000 (16:13 +1200)]
Allow `{}` to remain.

8 years agoRewrite match expressions
Nick Cameron [Fri, 14 Aug 2015 08:00:22 +0000 (20:00 +1200)]
Rewrite match expressions

8 years agoMerge pull request #178 from marcusklaas/single-config-override
Marcus Klaas de Vries [Wed, 19 Aug 2015 19:53:02 +0000 (21:53 +0200)]
Merge pull request #178 from marcusklaas/single-config-override

Allow override of single configuration lines in tests

8 years agoAdd option to override single configuration lines for tests
Marcus Klaas [Wed, 19 Aug 2015 19:41:19 +0000 (21:41 +0200)]
Add option to override single configuration lines for tests

8 years agoMerge pull request #176 from marcusklaas/no-backup
Marcus Klaas de Vries [Wed, 19 Aug 2015 19:34:07 +0000 (21:34 +0200)]
Merge pull request #176 from marcusklaas/no-backup

Add an option to forgo backups

8 years agoAdd an option to forgo backups
Marcus Klaas [Tue, 18 Aug 2015 19:10:30 +0000 (21:10 +0200)]
Add an option to forgo backups

8 years agoMerge pull request #188 from marcusklaas/refactor-itemize-list
Marcus Klaas de Vries [Wed, 19 Aug 2015 16:43:53 +0000 (18:43 +0200)]
Merge pull request #188 from marcusklaas/refactor-itemize-list

Refactor itemize list so that it produces an iterator

8 years agoRefactor itemize list so that it produces an iterator
Marcus Klaas [Wed, 19 Aug 2015 16:12:05 +0000 (18:12 +0200)]
Refactor itemize list so that it produces an iterator

8 years agoMerge pull request #193 from posix4e/doc-defaulttoml
Marcus Klaas de Vries [Tue, 18 Aug 2015 18:39:54 +0000 (20:39 +0200)]
Merge pull request #193 from posix4e/doc-defaulttoml

Doc defaulttoml

8 years agoProvide information about default.toml
Alex Newman [Tue, 18 Aug 2015 18:04:58 +0000 (11:04 -0700)]
Provide information about default.toml

8 years agoMerge pull request #174 from marcusklaas/format-paths
Marcus Klaas de Vries [Sun, 16 Aug 2015 20:59:03 +0000 (22:59 +0200)]
Merge pull request #174 from marcusklaas/format-paths

Format paths

8 years agoFormat paths
Marcus Klaas [Fri, 14 Aug 2015 12:09:19 +0000 (14:09 +0200)]
Format paths

8 years agoMerge pull request #159 from marcusklaas/explicit-self
Marcus Klaas de Vries [Fri, 14 Aug 2015 09:58:30 +0000 (11:58 +0200)]
Merge pull request #159 from marcusklaas/explicit-self

Correctly format typed self in function arguments

8 years agoCorrectly format typed self in function arguments
Marcus Klaas [Fri, 24 Jul 2015 17:54:38 +0000 (19:54 +0200)]
Correctly format typed self in function arguments

8 years agoMerge pull request #162 from cassiersg/sep-mods
cassiersg [Sun, 2 Aug 2015 12:51:48 +0000 (14:51 +0200)]
Merge pull request #162 from cassiersg/sep-mods

Move modules listing outside of FmtVisitor

8 years agoFix nits for filemap
Gaëtan Cassiers [Sun, 2 Aug 2015 12:49:35 +0000 (14:49 +0200)]
Fix nits for filemap

8 years agoKill ChangeSet and replace remaining part by FileMap
Gaëtan Cassiers [Sat, 1 Aug 2015 13:02:59 +0000 (15:02 +0200)]
Kill ChangeSet and replace remaining part by FileMap

Also fix style issues
Cargo update to get fixes of strings.rs (was cause of a misformatted
function call).

8 years agoRemove ChangeSet of FmtVisitor
Gaëtan Cassiers [Sun, 26 Jul 2015 12:05:43 +0000 (14:05 +0200)]
Remove ChangeSet of FmtVisitor

8 years agoSeparate modules and files listing of reformatting
Gaëtan Cassiers [Sun, 26 Jul 2015 10:55:25 +0000 (12:55 +0200)]
Separate modules and files listing of reformatting

As suggested in #141
Closes #156

8 years agoMerge pull request #167 from marcusklaas/unsafe
Marcus Klaas de Vries [Sun, 2 Aug 2015 10:42:00 +0000 (12:42 +0200)]
Merge pull request #167 from marcusklaas/unsafe

Properly format unsafe blocks

8 years agoProperly format unsafe blocks
Marcus Klaas [Sat, 1 Aug 2015 12:22:31 +0000 (14:22 +0200)]
Properly format unsafe blocks

8 years agoMerge pull request #164 from marcusklaas/rustup
Nick Cameron [Fri, 31 Jul 2015 15:03:31 +0000 (08:03 -0700)]
Merge pull request #164 from marcusklaas/rustup

Rustup

8 years agoPhase out token::get_ident in favour of ToString
Marcus Klaas [Fri, 31 Jul 2015 11:06:28 +0000 (13:06 +0200)]
Phase out token::get_ident in favour of ToString

token::get_ident was removed in rust commit 00a5e66f818ad9d79cc4425f5564c7b07e3213a6

8 years agoMerge pull request #144 from marcusklaas/single-use
Nick Cameron [Sat, 25 Jul 2015 21:38:07 +0000 (09:38 +1200)]
Merge pull request #144 from marcusklaas/single-use

Format simple imports

8 years agoMerge pull request #161 from cassiersg/fix-bin-op-width
Nick Cameron [Sat, 25 Jul 2015 21:37:12 +0000 (09:37 +1200)]
Merge pull request #161 from cassiersg/fix-bin-op-width

Add regression tests for binOps

8 years agoAdd regression tests for binOps
Gaëtan Cassiers [Sat, 25 Jul 2015 21:28:31 +0000 (23:28 +0200)]
Add regression tests for binOps

8 years agoFormat simple imports
Marcus Klaas [Sat, 25 Jul 2015 21:10:48 +0000 (23:10 +0200)]
Format simple imports

8 years agoMerge pull request #142 from cassiersg/rewrite-imports
Nick Cameron [Sat, 25 Jul 2015 21:03:56 +0000 (09:03 +1200)]
Merge pull request #142 from cassiersg/rewrite-imports

Move 'use' to Rewrite

8 years agoAdd a helper method to format imports
cassiersg [Mon, 20 Jul 2015 19:33:23 +0000 (21:33 +0200)]
Add a helper method to format imports

8 years agoIndent fix
cassiersg [Mon, 20 Jul 2015 19:14:45 +0000 (21:14 +0200)]
Indent fix

8 years agoMove 'use' to Rewrite
Gaëtan Cassiers [Fri, 17 Jul 2015 13:58:47 +0000 (15:58 +0200)]
Move 'use' to Rewrite

Implements Rewrite for ViewPath

Behavior change: always use max_width instead of ideal_width for use
list rewrite. I think it looks better, was also suggested by @nrc in
https://github.com/nrc/rustfmt/issues/82#issuecomment-105314265

8 years agoFix width computation in rewrite_binary_op
Gaëtan Cassiers [Sat, 25 Jul 2015 16:58:16 +0000 (18:58 +0200)]
Fix width computation in rewrite_binary_op

Operator width was counted twice.

8 years agoMerge pull request #147 from marcusklaas/even-more-expr
Nick Cameron [Fri, 24 Jul 2015 21:51:59 +0000 (09:51 +1200)]
Merge pull request #147 from marcusklaas/even-more-expr

Format if expressions & loops

8 years agoMerge pull request #158 from marcusklaas/modules
Nick Cameron [Fri, 24 Jul 2015 21:48:58 +0000 (09:48 +1200)]
Merge pull request #158 from marcusklaas/modules

Use new module code from libsyntax

8 years agoUse new module code from libsyntax
Marcus Klaas [Fri, 24 Jul 2015 13:29:04 +0000 (15:29 +0200)]
Use new module code from libsyntax

8 years agoRefactor some things; add extra tests.
Marcus Klaas [Mon, 20 Jul 2015 21:29:25 +0000 (23:29 +0200)]
Refactor some things; add extra tests.

8 years agoMerge pull request #157 from marcusklaas/box-syntax
Nick Cameron [Thu, 23 Jul 2015 22:30:15 +0000 (10:30 +1200)]
Merge pull request #157 from marcusklaas/box-syntax

Preserve box syntax

8 years agoPreserve box syntax
Marcus Klaas [Thu, 23 Jul 2015 21:08:41 +0000 (23:08 +0200)]
Preserve box syntax

8 years agoMerge pull request #151 from marcusklaas/fix-for-servo
Nick Cameron [Wed, 22 Jul 2015 22:18:36 +0000 (10:18 +1200)]
Merge pull request #151 from marcusklaas/fix-for-servo

Fix underflow bug in rewrite_call

8 years agoFix underflow bug in rewrite_call
Marcus Klaas [Wed, 22 Jul 2015 21:39:37 +0000 (23:39 +0200)]
Fix underflow bug in rewrite_call

Fixes https://github.com/nrc/rustfmt/issues/148.
Now properly propagates the rewrite failure instead of panicking. Added regression test from servo code. This example will be properly rewritten when https://github.com/nrc/rustfmt/issues/17 is addressed.

8 years agoSimplify CompilerCalls impl
Nick Cameron [Wed, 22 Jul 2015 20:05:34 +0000 (08:05 +1200)]
Simplify CompilerCalls impl

8 years agoMerge pull request #146 from marcusklaas/fix-inverted-span
Nick Cameron [Mon, 20 Jul 2015 19:38:20 +0000 (07:38 +1200)]
Merge pull request #146 from marcusklaas/fix-inverted-span

Format unnamed function arguments

8 years agoFormat unnamed function arguments
Marcus Klaas [Sun, 19 Jul 2015 12:33:02 +0000 (14:33 +0200)]
Format unnamed function arguments

8 years agoFormat all the loops!
Marcus Klaas [Sun, 19 Jul 2015 21:39:48 +0000 (23:39 +0200)]
Format all the loops!

8 years agoFormat if-let-else expressions
Marcus Klaas [Sun, 19 Jul 2015 20:25:44 +0000 (22:25 +0200)]
Format if-let-else expressions

8 years agoFormat if-else expressions
Marcus Klaas [Sun, 19 Jul 2015 21:42:54 +0000 (23:42 +0200)]
Format if-else expressions

8 years agoFormat while loops, including labels
Marcus Klaas [Thu, 16 Jul 2015 14:29:28 +0000 (16:29 +0200)]
Format while loops, including labels

8 years agoResolve some warnings
Nick Cameron [Fri, 17 Jul 2015 06:26:10 +0000 (18:26 +1200)]
Resolve some warnings

8 years agoMerge pull request #137 from nrc/struct-lit-opt
Nick Cameron [Thu, 16 Jul 2015 18:57:01 +0000 (06:57 +1200)]
Merge pull request #137 from nrc/struct-lit-opt

Options for formatting struct literals

8 years agoMerge pull request #139 from nrc/todo-sorry
Nick Cameron [Thu, 16 Jul 2015 18:56:38 +0000 (06:56 +1200)]
Merge pull request #139 from nrc/todo-sorry

Don't apologise if its not our fault in warnings

8 years agoTidy up some overrunning lines
Nick Cameron [Thu, 16 Jul 2015 02:23:48 +0000 (14:23 +1200)]
Tidy up some overrunning lines

8 years agoDon't apologise if its not our fault in warnings
Nick Cameron [Thu, 16 Jul 2015 02:17:07 +0000 (14:17 +1200)]
Don't apologise if its not our fault in warnings

8 years agoFix some bugs
Nick Cameron [Thu, 16 Jul 2015 02:03:52 +0000 (14:03 +1200)]
Fix some bugs

8 years agoReformat code to new struct lit style
Nick Cameron [Thu, 16 Jul 2015 01:31:20 +0000 (13:31 +1200)]
Reformat code to new struct lit style

8 years agoAdd an option to format struct lits with either block or visual indent
Nick Cameron [Wed, 15 Jul 2015 22:44:43 +0000 (10:44 +1200)]
Add an option to format struct lits with either block or visual indent

8 years agoMerge pull request #128 from marcusklaas/subexpr
Nick Cameron [Wed, 15 Jul 2015 22:08:36 +0000 (10:08 +1200)]
Merge pull request #128 from marcusklaas/subexpr

Format loops

8 years agoFormat loops
Marcus Klaas [Mon, 13 Jul 2015 19:51:56 +0000 (21:51 +0200)]
Format loops

8 years agoMerge pull request #132 from cassiersg/fix-tup-lit
Nick Cameron [Wed, 15 Jul 2015 19:05:54 +0000 (07:05 +1200)]
Merge pull request #132 from cassiersg/fix-tup-lit

Fix bug in rewrite_tup_lit

8 years agoFix bug in rewrite_tup_lit
Gaëtan Cassiers [Tue, 14 Jul 2015 22:38:54 +0000 (00:38 +0200)]
Fix bug in rewrite_tup_lit

Wasn't using all width available when the lenght is more than 1.

9 years agoMerge pull request #122 from cassiersg/fix-mod
Nick Cameron [Sun, 5 Jul 2015 19:07:08 +0000 (07:07 +1200)]
Merge pull request #122 from cassiersg/fix-mod

Reformat modules in external files

9 years agoRun rustfmt on the code
Gaëtan Cassiers [Fri, 3 Jul 2015 09:13:28 +0000 (11:13 +0200)]
Run rustfmt on the code

9 years agoFormat modules into separate files
Gaëtan Cassiers [Wed, 1 Jul 2015 19:13:10 +0000 (21:13 +0200)]
Format modules into separate files

9 years agoAdd comma after struct-like enum variant
Gaëtan Cassiers [Wed, 1 Jul 2015 18:49:45 +0000 (20:49 +0200)]
Add comma after struct-like enum variant

This is mandatory.

9 years agoFix fn decl rewriting in case of generics
Gaëtan Cassiers [Wed, 1 Jul 2015 23:20:07 +0000 (01:20 +0200)]
Fix fn decl rewriting in case of generics

An opening paren in generics caused a false-positive detection of args
beginning. The result was the creation of comments with some code into
it.

9 years agoMerge pull request #124 from cassiersg/fix-bin-op
Nick Cameron [Fri, 3 Jul 2015 00:58:02 +0000 (17:58 -0700)]
Merge pull request #124 from cassiersg/fix-bin-op

Fix bugs in width computation for bin op

9 years agoFix bugs in width computation
Gaëtan Cassiers [Thu, 2 Jul 2015 22:50:55 +0000 (00:50 +0200)]
Fix bugs in width computation

9 years agoMerge pull request #99 from marcusklaas/bool-expr
Nick Cameron [Thu, 2 Jul 2015 21:05:25 +0000 (14:05 -0700)]
Merge pull request #99 from marcusklaas/bool-expr

Format expressions with binary and unary operators

9 years agoFormat expressions with binary and unary operators
Marcus Klaas [Thu, 2 Jul 2015 20:40:20 +0000 (22:40 +0200)]
Format expressions with binary and unary operators

9 years agoMerge pull request #113 from marcusklaas/import-comments
Nick Cameron [Thu, 2 Jul 2015 19:34:22 +0000 (12:34 -0700)]
Merge pull request #113 from marcusklaas/import-comments

Update import list formatting

9 years agoUpdate import list formatting
Marcus Klaas [Fri, 26 Jun 2015 01:29:54 +0000 (03:29 +0200)]
Update import list formatting

Include comments and sort items alphabetically.

9 years agoMerge pull request #93 from marcusklaas/tuple-structs
Nick Cameron [Thu, 25 Jun 2015 21:18:19 +0000 (14:18 -0700)]
Merge pull request #93 from marcusklaas/tuple-structs

Format tuple like structs

9 years agoFixup comment wrapping in lists
Marcus Klaas [Wed, 24 Jun 2015 19:14:08 +0000 (21:14 +0200)]
Fixup comment wrapping in lists

9 years agoFormat comments in struct literals
Marcus Klaas [Tue, 23 Jun 2015 23:11:29 +0000 (01:11 +0200)]
Format comments in struct literals

9 years agoFormat tuple-like structs
Marcus Klaas [Tue, 23 Jun 2015 13:58:58 +0000 (15:58 +0200)]
Format tuple-like structs

9 years agoMerge pull request #112 from marcusklaas/config-fix
Nick Cameron [Tue, 23 Jun 2015 13:18:07 +0000 (06:18 -0700)]
Merge pull request #112 from marcusklaas/config-fix

Remove global mutable config to allow for concurrency

9 years agoRemove global mutable config to allow for concurrency
Marcus Klaas [Tue, 23 Jun 2015 11:26:04 +0000 (13:26 +0200)]
Remove global mutable config to allow for concurrency

9 years agoMerge pull request #90 from marcusklaas/empty-imports
Nick Cameron [Tue, 23 Jun 2015 00:32:55 +0000 (17:32 -0700)]
Merge pull request #90 from marcusklaas/empty-imports

Remove empty list imports

9 years agoMerge pull request #107 from cassiersg/rewrite
Nick Cameron [Tue, 23 Jun 2015 00:30:27 +0000 (17:30 -0700)]
Merge pull request #107 from cassiersg/rewrite

Add a Rewrite trait

9 years agoUse FromIterator implementation for Option
Gaëtan Cassiers [Mon, 22 Jun 2015 11:33:19 +0000 (13:33 +0200)]
Use FromIterator implementation for Option

Combined with try_opt!, this avoid an explicit for loop or another macro.

9 years agoComments for Rewrite
Gaëtan Cassiers [Mon, 22 Jun 2015 01:04:34 +0000 (03:04 +0200)]
Comments for Rewrite

9 years agoAdd a try_opt! macro for ease of work with Rewrite
Gaëtan Cassiers [Mon, 22 Jun 2015 00:53:28 +0000 (02:53 +0200)]
Add a try_opt! macro for ease of work with Rewrite

9 years agoA basic impl of Rewrite for ast::Expr
Gaëtan Cassiers [Tue, 16 Jun 2015 15:29:05 +0000 (17:29 +0200)]
A basic impl of Rewrite for ast::Expr

9 years agoMerge pull request #114 from marcusklaas/rustup
Nick Cameron [Mon, 22 Jun 2015 22:36:20 +0000 (15:36 -0700)]
Merge pull request #114 from marcusklaas/rustup

Rustup

9 years agoMerge pull request #117 from cassiersg/fix-round-power-of-two
Nick Cameron [Mon, 22 Jun 2015 17:37:29 +0000 (10:37 -0700)]
Merge pull request #117 from cassiersg/fix-round-power-of-two

Use wrapping operations for bit-level functions

9 years agoUse wrapping operations for bit-level functions
Gaëtan Cassiers [Mon, 22 Jun 2015 14:49:00 +0000 (16:49 +0200)]
Use wrapping operations for bit-level functions

This handles a underflow panic on round_up_to_power_of_two(0).

9 years agoRustup
Marcus Klaas [Fri, 19 Jun 2015 23:39:13 +0000 (01:39 +0200)]
Rustup

9 years agoMerge pull request #109 from marcusklaas/fix-string-lit
Nick Cameron [Mon, 15 Jun 2015 21:59:24 +0000 (09:59 +1200)]
Merge pull request #109 from marcusklaas/fix-string-lit

Fix off-by-one errors in rewrite_string_lit

9 years agoMerge pull request #96 from marcusklaas/find-uncommented
Nick Cameron [Mon, 15 Jun 2015 21:45:01 +0000 (09:45 +1200)]
Merge pull request #96 from marcusklaas/find-uncommented

Deal with problematic characters in comments

9 years agoAdd tests for string literal formatting
Marcus Klaas [Mon, 15 Jun 2015 19:37:27 +0000 (21:37 +0200)]
Add tests for string literal formatting

9 years agoFix off-by-one bugs in `rewrite_string_lit`
Marcus Klaas [Mon, 15 Jun 2015 19:34:52 +0000 (21:34 +0200)]
Fix off-by-one bugs in `rewrite_string_lit`

Multi-line literals would typically have a character too many. Splitting of escape sequences also wasn't working correctly.

9 years agoDeal with problematic characters in comments
Marcus Klaas [Fri, 5 Jun 2015 14:56:59 +0000 (16:56 +0200)]
Deal with problematic characters in comments

9 years agoMerge pull request #106 from marcusklaas/issue-number-check-2
Nick Cameron [Mon, 15 Jun 2015 08:32:12 +0000 (20:32 +1200)]
Merge pull request #106 from marcusklaas/issue-number-check-2

Implement checks for unnumbered TODOs and FIXMEs

9 years agoImplement checks for unnumbered TODOs and FIXMEs
Marcus Klaas [Mon, 8 Jun 2015 23:42:29 +0000 (01:42 +0200)]
Implement checks for unnumbered TODOs and FIXMEs

9 years agoMerge pull request #101 from nrc/test
Nick Cameron [Thu, 11 Jun 2015 02:43:12 +0000 (14:43 +1200)]
Merge pull request #101 from nrc/test

Add a terrible, but useful, test which I used locally