]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoMinor clippy fixes
Manish Goregaokar [Fri, 4 Dec 2015 12:32:19 +0000 (18:02 +0530)]
Minor clippy fixes

8 years agoMerge pull request #667 from Marwes/alias_where
Marcus Klaas de Vries [Wed, 2 Dec 2015 19:45:01 +0000 (20:45 +0100)]
Merge pull request #667 from Marwes/alias_where

Fix missed edgecases in formatting of type aliases

8 years agoDon't remove where clauses in type aliases
Markus Westerlind [Wed, 2 Dec 2015 18:39:45 +0000 (19:39 +0100)]
Don't remove where clauses in type aliases

8 years agoFix formatting of type aliases where '=' is at or close to the max width
Markus Westerlind [Wed, 2 Dec 2015 18:38:05 +0000 (19:38 +0100)]
Fix formatting of type aliases where '=' is at or close to the max width

8 years agoMerge pull request #659 from Marwes/where_clause
Marcus Klaas de Vries [Wed, 2 Dec 2015 18:06:24 +0000 (19:06 +0100)]
Merge pull request #659 from Marwes/where_clause

Fix where clauses not taking the width of the line into account

8 years agoMerge pull request #663 from SingingTree/match_trailing_comma
Marcus Klaas de Vries [Wed, 2 Dec 2015 18:05:04 +0000 (19:05 +0100)]
Merge pull request #663 from SingingTree/match_trailing_comma

WIP: Trailing commas for match block arms

8 years agoUpdate block checking code
Bryce Van Dyk [Wed, 2 Dec 2015 03:44:40 +0000 (16:44 +1300)]
Update block checking code

8 years agoAdd a BraceStyle parameter to rewrite_where_clause
Markus Westerlind [Tue, 1 Dec 2015 18:51:49 +0000 (19:51 +0100)]
Add a BraceStyle parameter to rewrite_where_clause

This allow it to exactly calculate if it needs to break the where clause into multiple lines

8 years agoUpdate trailing comma match logic, add tests
Bryce Van Dyk [Tue, 1 Dec 2015 07:10:57 +0000 (20:10 +1300)]
Update trailing comma match logic, add tests

Updates the traling comma code to attempt to handle multiline non-block bodies when
adding traling commas to blocks. Also add and update tests to cover better
the interactions between trailing commas and wrapping match arms.

8 years agoTrailing commas for match block arms
Bryce Van Dyk [Mon, 30 Nov 2015 08:51:20 +0000 (21:51 +1300)]
Trailing commas for match block arms

Attempt to implement an option for trailing commas for block based match arms (issue
173). Put in place test files to verify this behaviour.

8 years agoUse the BraceStyle config to calculate the width for braces in where clasues
Markus Westerlind [Sat, 28 Nov 2015 12:59:14 +0000 (13:59 +0100)]
Use the BraceStyle config to calculate the width for braces in where clasues

8 years agoMerge pull request #662 from crumblingstatue/patch-1
Nick Cameron [Sat, 28 Nov 2015 09:14:24 +0000 (22:14 +1300)]
Merge pull request #662 from crumblingstatue/patch-1

Fix typo in README.md

8 years agoFix typo in README.md
Mika Attila [Sat, 28 Nov 2015 09:03:46 +0000 (10:03 +0100)]
Fix typo in README.md

We conform to (i.e. comply with) the Rust Style Guidelines, not confirm their validity.

8 years agoMerge pull request #660 from sanxiyn/unused-import
Nick Cameron [Fri, 27 Nov 2015 21:03:03 +0000 (10:03 +1300)]
Merge pull request #660 from sanxiyn/unused-import

Remove unused imports

8 years agoRemove unused imports
Seo Sanghyeon [Fri, 27 Nov 2015 14:38:05 +0000 (23:38 +0900)]
Remove unused imports

8 years agoFix where clauses not taking the width of the line into account
Markus Westerlind [Fri, 27 Nov 2015 08:25:31 +0000 (09:25 +0100)]
Fix where clauses not taking the width of the line into account

Fixes #630

8 years agoMerge pull request #640 from Marwes/alias
Nick Cameron [Thu, 26 Nov 2015 20:30:10 +0000 (09:30 +1300)]
Merge pull request #640 from Marwes/alias

Format type aliases

8 years agoUse utils::last_line_width in rewrite_type_alias
Markus Westerlind [Thu, 26 Nov 2015 20:20:04 +0000 (21:20 +0100)]
Use utils::last_line_width in rewrite_type_alias

8 years agoFormat type aliases
Markus Westerlind [Sun, 22 Nov 2015 18:21:01 +0000 (19:21 +0100)]
Format type aliases

Fixes #486

8 years agoMerge pull request #655 from kyeah/impl-comments
Nick Cameron [Thu, 26 Nov 2015 04:59:22 +0000 (17:59 +1300)]
Merge pull request #655 from kyeah/impl-comments

Keep comments in empty impl body

8 years agoReformat trim_newlines
Kevin Yeh [Thu, 26 Nov 2015 04:25:02 +0000 (22:25 -0600)]
Reformat trim_newlines

8 years agoMerge pull request #658 from sanxiyn/clippy
Nick Cameron [Wed, 25 Nov 2015 07:07:21 +0000 (20:07 +1300)]
Merge pull request #658 from sanxiyn/clippy

Apply Clippy

8 years agoApply Clippy
Seo Sanghyeon [Wed, 25 Nov 2015 06:39:15 +0000 (15:39 +0900)]
Apply Clippy

8 years agoFix empty trim_newline panic, add impl macro test
Kevin Yeh [Tue, 24 Nov 2015 20:37:31 +0000 (14:37 -0600)]
Fix empty trim_newline panic, add impl macro test

8 years agoAdd impl newline tests
Kevin Yeh [Tue, 24 Nov 2015 04:54:44 +0000 (22:54 -0600)]
Add impl newline tests

8 years agoKeep comments in empty impl bodies
Kevin Yeh [Tue, 24 Nov 2015 04:54:44 +0000 (22:54 -0600)]
Keep comments in empty impl bodies

8 years agoMerge pull request #642 from rust-lang-nursery/impl
Marcus Klaas de Vries [Mon, 23 Nov 2015 21:09:28 +0000 (22:09 +0100)]
Merge pull request #642 from rust-lang-nursery/impl

Implement formatting of impls

8 years agoFix a bug with nested impls
Nick Cameron [Mon, 23 Nov 2015 02:49:21 +0000 (15:49 +1300)]
Fix a bug with nested impls

8 years agoMerge pull request #646 from rust-lang-nursery/mulit-file
Marcus Klaas de Vries [Mon, 23 Nov 2015 20:35:09 +0000 (21:35 +0100)]
Merge pull request #646 from rust-lang-nursery/mulit-file

 Handle multiply-referenced files

8 years agoMerge pull request #649 from jaxx/dependency-upd1
Nick Cameron [Mon, 23 Nov 2015 19:08:35 +0000 (08:08 +1300)]
Merge pull request #649 from jaxx/dependency-upd1

update dependencies and fix compile errors

8 years agoupdate dependencies and fix compile errors
Jakko Sikkar [Mon, 23 Nov 2015 18:54:33 +0000 (20:54 +0200)]
update dependencies and fix compile errors

8 years agoHandle multiply-referenced files
Nick Cameron [Mon, 23 Nov 2015 02:22:00 +0000 (15:22 +1300)]
Handle multiply-referenced files

Fixes #645

8 years agoMerge pull request #641 from marcusklaas/fix-doc-commentz
Nick Cameron [Mon, 23 Nov 2015 00:58:19 +0000 (13:58 +1300)]
Merge pull request #641 from marcusklaas/fix-doc-commentz

Correct doc comment indentation for struct fields

8 years agoTypes which can be return types for function types
Nick Cameron [Mon, 23 Nov 2015 00:23:41 +0000 (13:23 +1300)]
Types which can be return types for function types

Fixes #643

8 years agotests
Nick Cameron [Mon, 23 Nov 2015 00:07:53 +0000 (13:07 +1300)]
tests

8 years agoReformatting due to changes
Nick Cameron [Sun, 22 Nov 2015 23:02:54 +0000 (12:02 +1300)]
Reformatting due to changes

8 years agoImplement formatting for impls
Nick Cameron [Sun, 22 Nov 2015 23:00:22 +0000 (12:00 +1300)]
Implement formatting for impls

Fixes #614

8 years agoCorrect doc comment indentation for struct fields
Marcus Klaas [Sun, 22 Nov 2015 21:55:57 +0000 (22:55 +0100)]
Correct doc comment indentation for struct fields

Fix https://github.com/rust-lang-nursery/rustfmt/issues/572.

8 years agoMerge pull request #639 from rust-lang-nursery/mod-skip
Marcus Klaas de Vries [Sun, 22 Nov 2015 21:16:31 +0000 (22:16 +0100)]
Merge pull request #639 from rust-lang-nursery/mod-skip

Take rustfmt_skip attribute into account on modules

8 years agoTake rustfmt_skip attribute into account on modules
Nick Cameron [Sun, 22 Nov 2015 20:20:53 +0000 (09:20 +1300)]
Take rustfmt_skip attribute into account on modules

Closes #632

8 years agoMerge pull request #638 from marcusklaas/visual-struct-last-comment
Nick Cameron [Sun, 22 Nov 2015 18:23:58 +0000 (07:23 +1300)]
Merge pull request #638 from marcusklaas/visual-struct-last-comment

Fix last comment for visually formatted struct lits

8 years agoMerge pull request #637 from marcusklaas/fn-type
Nick Cameron [Sun, 22 Nov 2015 18:22:26 +0000 (07:22 +1300)]
Merge pull request #637 from marcusklaas/fn-type

Improve function type formatting

8 years agoFix last comment for visually formatted struct lits
Marcus Klaas [Sun, 22 Nov 2015 16:41:54 +0000 (17:41 +0100)]
Fix last comment for visually formatted struct lits

8 years agoFormat bare function types
Marcus Klaas [Sun, 22 Nov 2015 15:07:38 +0000 (16:07 +0100)]
Format bare function types

Fix https://github.com/rust-lang-nursery/rustfmt/issues/616.
Fix https://github.com/rust-lang-nursery/rustfmt/issues/276.
Close https://github.com/rust-lang-nursery/rustfmt/issues/350.

8 years agoFix up indentation of function style paths
Marcus Klaas [Sun, 22 Nov 2015 13:48:30 +0000 (14:48 +0100)]
Fix up indentation of function style paths

Fixes https://github.com/rust-lang-nursery/rustfmt/issues/105.

8 years agoExtract fn rewrite methods from RewriteVisitor
Marcus Klaas [Sun, 22 Nov 2015 12:45:51 +0000 (13:45 +0100)]
Extract fn rewrite methods from RewriteVisitor

8 years agoMerge pull request #636 from KiChjang/spelling
Nick Cameron [Sun, 22 Nov 2015 05:37:51 +0000 (18:37 +1300)]
Merge pull request #636 from KiChjang/spelling

Fix incorrect usage of 'it's'

8 years agoFix incorrect usage of 'it's'
Keith Yeung [Sat, 21 Nov 2015 23:55:42 +0000 (15:55 -0800)]
Fix incorrect usage of 'it's'

8 years agoMerge pull request #633 from marcusklaas/mod-comment
Marcus Klaas de Vries [Sat, 21 Nov 2015 20:24:29 +0000 (21:24 +0100)]
Merge pull request #633 from marcusklaas/mod-comment

Rewrite module declarations

8 years agoRewrite module declarations
Marcus Klaas [Fri, 20 Nov 2015 21:44:15 +0000 (22:44 +0100)]
Rewrite module declarations

8 years agoMerge pull request #635 from Marwes/long_field_access
Marcus Klaas de Vries [Sat, 21 Nov 2015 20:04:34 +0000 (21:04 +0100)]
Merge pull request #635 from Marwes/long_field_access

Fix long field accesses not being broken onto separate lines

8 years agoFix long field accesses not being broken onto separate lines
Markus Westerlind [Sat, 21 Nov 2015 00:04:23 +0000 (01:04 +0100)]
Fix long field accesses not being broken onto separate lines

Fixes #512

8 years agoMerge pull request #634 from Marwes/block_comment_crlf
Nick Cameron [Fri, 20 Nov 2015 23:47:53 +0000 (12:47 +1300)]
Merge pull request #634 from Marwes/block_comment_crlf

Avoid adding an extra newline after block comments

8 years agoAvoid adding an extra newline after block comments
Markus Westerlind [Fri, 20 Nov 2015 22:31:05 +0000 (23:31 +0100)]
Avoid adding an extra newline after block comments

When block comments were rewritten to line comments they check if a new line needs to be added and adds one if needed. It only checked for '\n' however which would cause a newline to be added even if the comment was ended by "\r\n"

8 years agoMerge pull request #603 from marcusklaas/multiline-math-armz
Marcus Klaas de Vries [Fri, 20 Nov 2015 20:58:39 +0000 (21:58 +0100)]
Merge pull request #603 from marcusklaas/multiline-math-armz

Wrap/unwrap match arms

8 years agoAdd option to disable (un)wrapping of match arms
Marcus Klaas [Fri, 20 Nov 2015 20:50:25 +0000 (21:50 +0100)]
Add option to disable (un)wrapping of match arms

8 years agoForce chains to adhere to restrictions
Marcus Klaas [Sat, 14 Nov 2015 20:59:04 +0000 (21:59 +0100)]
Force chains to adhere to restrictions

8 years agoUnwrap match arms that are simple blocks
Marcus Klaas [Sat, 14 Nov 2015 20:57:31 +0000 (21:57 +0100)]
Unwrap match arms that are simple blocks

8 years agoBlockify multiline match arms
Marcus Klaas [Fri, 20 Nov 2015 20:05:10 +0000 (21:05 +0100)]
Blockify multiline match arms

8 years agoMerge pull request #631 from malbarbo/patch-1
Nick Cameron [Fri, 20 Nov 2015 20:00:40 +0000 (09:00 +1300)]
Merge pull request #631 from malbarbo/patch-1

Update README.md

8 years agoUpdate README.md
Marco A L Barbosa [Fri, 20 Nov 2015 18:58:57 +0000 (16:58 -0200)]
Update README.md

8 years agoMerge pull request #618 from zyphrus/master
Nick Cameron [Fri, 20 Nov 2015 05:14:26 +0000 (18:14 +1300)]
Merge pull request #618 from zyphrus/master

Comments in structs use appropriate style

8 years agoMerge pull request #628 from kyeah/single-line-fn
Nick Cameron [Fri, 20 Nov 2015 05:13:03 +0000 (18:13 +1300)]
Merge pull request #628 from kyeah/single-line-fn

Single-line Functions

8 years agoCombine rewrite_single_line_fn and rewrite_fn
Kevin Yeh [Fri, 20 Nov 2015 02:49:24 +0000 (20:49 -0600)]
Combine rewrite_single_line_fn and rewrite_fn

8 years agoFix empty body format, add fn_empty_single_line option, refactor block tests
Kevin Yeh [Fri, 20 Nov 2015 02:11:32 +0000 (20:11 -0600)]
Fix empty body format, add fn_empty_single_line option, refactor block tests

8 years agoMerge pull request #629 from sfackler/usage
Nick Cameron [Fri, 20 Nov 2015 02:09:42 +0000 (15:09 +1300)]
Merge pull request #629 from sfackler/usage

Use argv[0] for usage output

8 years agoUse argv[0] for usage output
Steven Fackler [Fri, 20 Nov 2015 01:56:37 +0000 (17:56 -0800)]
Use argv[0] for usage output

Usage messages traditionally use this as it contains the path that the
user provided to run the executable (e.g. `rustfmt` instead of
`/usr/local/bin/rustfmt`).

8 years agoUse tactic instead of config
David Barnett [Thu, 19 Nov 2015 21:37:00 +0000 (10:37 +1300)]
Use tactic instead of config

Add mixed test
Mixed is unreachable as there is no input combination that could get
to this value

8 years agoImplement Rewrite for ast::Stmt
Kevin Yeh [Thu, 19 Nov 2015 08:08:17 +0000 (02:08 -0600)]
Implement Rewrite for ast::Stmt

8 years agoCombine block utilities
Kevin Yeh [Thu, 19 Nov 2015 07:53:25 +0000 (01:53 -0600)]
Combine block utilities

8 years agoSupport single-line functions
Kevin Yeh [Wed, 18 Nov 2015 04:53:06 +0000 (22:53 -0600)]
Support single-line functions

By default, places functions with empty bodies on one line.
If the function has only one expression or statement that fits on one line, the 'fn_single_line' option can be used.

8 years agoMerge pull request #619 from SiegeLord/item_brace_style_1
Nick Cameron [Thu, 19 Nov 2015 18:41:12 +0000 (07:41 +1300)]
Merge pull request #619 from SiegeLord/item_brace_style_1

Implement initial option for brace style for non-fn items.

8 years agoProperly follow the brace styles.
Pavel Sountsov [Thu, 19 Nov 2015 06:34:14 +0000 (22:34 -0800)]
Properly follow the brace styles.

8 years agoTest for single arm in struct
David Barnett [Wed, 18 Nov 2015 10:30:23 +0000 (23:30 +1300)]
Test for single arm in struct

8 years agoComments.
Pavel Sountsov [Tue, 17 Nov 2015 07:18:07 +0000 (23:18 -0800)]
Comments.

- Move the option
- Add some more tests (don't pass yet)

8 years agoMerge pull request #620 from sidred10/atom-instructions
Nick Cameron [Tue, 17 Nov 2015 05:28:57 +0000 (18:28 +1300)]
Merge pull request #620 from sidred10/atom-instructions

Atom instructions

8 years agoremove unnecessary full stop
sid [Tue, 17 Nov 2015 05:24:42 +0000 (10:54 +0530)]
remove unnecessary full stop

8 years agoupdate atom instructions
sid [Tue, 17 Nov 2015 05:22:05 +0000 (10:52 +0530)]
update atom instructions

8 years agoMerge pull request #591 from rust-lang-nursery/atom
Nick Cameron [Tue, 17 Nov 2015 03:14:06 +0000 (16:14 +1300)]
Merge pull request #591 from rust-lang-nursery/atom

Instructions for using Rustfmt from Atom.

8 years agoInstructions for using Rustfmt from Atom.
Nick Cameron [Thu, 12 Nov 2015 21:49:06 +0000 (10:49 +1300)]
Instructions for using Rustfmt from Atom.

Closes #581

8 years agoComments in structs use appropriate style
David Barnett [Mon, 16 Nov 2015 22:57:49 +0000 (11:57 +1300)]
Comments in structs use appropriate style

Fixes #491

8 years agoMerge pull request #589 from rust-lang-nursery/rustup
Nick Cameron [Mon, 16 Nov 2015 18:53:09 +0000 (07:53 +1300)]
Merge pull request #589 from rust-lang-nursery/rustup

Slightly awkward rustup

8 years agoRustup
Nick Cameron [Thu, 12 Nov 2015 20:38:41 +0000 (09:38 +1300)]
Rustup

8 years agoImplement initial option for brace style for non-fn items.
Pavel Sountsov [Sun, 15 Nov 2015 19:55:18 +0000 (11:55 -0800)]
Implement initial option for brace style for non-fn items.

8 years agoMerge pull request #607 from rhoot/native-newline
Nick Cameron [Sun, 15 Nov 2015 19:25:22 +0000 (08:25 +1300)]
Merge pull request #607 from rhoot/native-newline

Adding a "Native" option to newline_style.

8 years agoMerge pull request #605 from sanxiyn/verbose
Nick Cameron [Sun, 15 Nov 2015 18:33:39 +0000 (07:33 +1300)]
Merge pull request #605 from sanxiyn/verbose

Add verbose mode

8 years agoAdds a "Native" option to newline_style.
Johan Sköld [Sun, 15 Nov 2015 11:34:04 +0000 (03:34 -0800)]
Adds a "Native" option to newline_style.

By using it one will get \r\n line endings on Windows, and \n line endings
on other platforms.

8 years agoAdd verbose mode
Seo Sanghyeon [Sun, 15 Nov 2015 06:41:41 +0000 (15:41 +0900)]
Add verbose mode

8 years agoMerge pull request #604 from eefriedman/path-cleanup
Marcus Klaas de Vries [Sat, 14 Nov 2015 23:02:12 +0000 (00:02 +0100)]
Merge pull request #604 from eefriedman/path-cleanup

Pass in whether an ast::Path is in an expression context.

8 years agoPass in whether an ast::Path is in an expression context.
Eli Friedman [Sat, 14 Nov 2015 21:52:43 +0000 (13:52 -0800)]
Pass in whether an ast::Path is in an expression context.

This gets rid of a slightly nasty hack involving scanning the source
expression for a ":".

8 years agoMerge pull request #601 from thorbenk/chains_tabbed_indent
Marcus Klaas de Vries [Sat, 14 Nov 2015 21:00:11 +0000 (22:00 +0100)]
Merge pull request #601 from thorbenk/chains_tabbed_indent

Chains tabbed indent

8 years agonew config 'chain_indent'
Thorben Kroeger [Sat, 14 Nov 2015 16:47:59 +0000 (17:47 +0100)]
new config 'chain_indent'

8 years agoMerge pull request #602 from crumblingstatue/report_newline
Marcus Klaas de Vries [Sat, 14 Nov 2015 18:23:00 +0000 (19:23 +0100)]
Merge pull request #602 from crumblingstatue/report_newline

Don't print an unnecessary newline after printing format report

8 years agoMerge pull request #600 from thorbenk/config_help_cmd
Marcus Klaas de Vries [Sat, 14 Nov 2015 18:22:27 +0000 (19:22 +0100)]
Merge pull request #600 from thorbenk/config_help_cmd

fix documentation of config help

8 years agoDon't print an unnecessary newline after printing format report
Mika Attila [Sat, 14 Nov 2015 18:01:28 +0000 (19:01 +0100)]
Don't print an unnecessary newline after printing format report

The Display implementation for FormatReport already prints
a newline after every error.

However, if the format report does not contain errors, we
don't want to print an empty newline.

This behavior clutters up the console output with
empty lines when rustfmt is invoked multiple times
(from .e.g a script or cargo-fmt).

So instead of using println! to print the report, we just
use print!.

8 years agofix documentation of config help
Thorben Kroeger [Sat, 14 Nov 2015 15:43:18 +0000 (16:43 +0100)]
fix documentation of config help

8 years agoMerge pull request #596 from marcusklaas/where-indent
Nick Cameron [Fri, 13 Nov 2015 21:04:04 +0000 (10:04 +1300)]
Merge pull request #596 from marcusklaas/where-indent

Fix brace indentation after where clause

8 years agoMerge pull request #597 from marcusklaas/method-generix
Nick Cameron [Fri, 13 Nov 2015 21:03:12 +0000 (10:03 +1300)]
Merge pull request #597 from marcusklaas/method-generix

Fix span issue with generic method calls

8 years agoMerge pull request #593 from JanLikar/Fix580
Nick Cameron [Fri, 13 Nov 2015 21:01:58 +0000 (10:01 +1300)]
Merge pull request #593 from JanLikar/Fix580

Enable rustfmt to format a list of files

8 years agoFix span issue with generic method calls
Marcus Klaas [Fri, 13 Nov 2015 13:53:34 +0000 (14:53 +0100)]
Fix span issue with generic method calls