]> git.lizzy.rs Git - rust.git/log
rust.git
6 years agoMove isatty() to utils.rs
topecongiro [Tue, 15 Aug 2017 07:49:02 +0000 (16:49 +0900)]
Move isatty() to utils.rs

6 years agoMerge pull request #1872 from sinkuu/remove_newline
Seiichi Uchida [Mon, 14 Aug 2017 15:28:31 +0000 (00:28 +0900)]
Merge pull request #1872 from sinkuu/remove_newline

Remove blank lines at start or end of block

6 years agoMerge pull request #1879 from topecongiro/issue-1878
Nick Cameron [Sun, 13 Aug 2017 23:10:28 +0000 (11:10 +1200)]
Merge pull request #1879 from topecongiro/issue-1878

Use correct width for subexpr_list

6 years agoMerge pull request #1876 from Marwes/patch-1
Nick Cameron [Sun, 13 Aug 2017 23:06:06 +0000 (11:06 +1200)]
Merge pull request #1876 from Marwes/patch-1

Explain how to solve missing dll's on Windows

6 years agoMerge pull request #1875 from topecongiro/empty-tuple-pattern
Nick Cameron [Sun, 13 Aug 2017 23:05:39 +0000 (11:05 +1200)]
Merge pull request #1875 from topecongiro/empty-tuple-pattern

Allow empty tuple pattern

6 years agoMerge pull request #1829 from topecongiro/issue-1046
Nick Cameron [Sun, 13 Aug 2017 21:52:28 +0000 (09:52 +1200)]
Merge pull request #1829 from topecongiro/issue-1046

Allow attributes to stay on the same line with fields

6 years agoUse correct width for subexpr_list
topecongiro [Sun, 13 Aug 2017 01:17:52 +0000 (10:17 +0900)]
Use correct width for subexpr_list

6 years agoUse utils::inner_attributes
sinkuu [Sat, 12 Aug 2017 08:01:46 +0000 (17:01 +0900)]
Use utils::inner_attributes

6 years agoUse attribute span
sinkuu [Fri, 11 Aug 2017 13:16:24 +0000 (22:16 +0900)]
Use attribute span

6 years agoExplain how to solve missing dll's on Windows
Markus Westerlind [Sat, 12 Aug 2017 07:38:12 +0000 (09:38 +0200)]
Explain how to solve missing dll's on Windows

cc #1736

6 years agoAllow empty tuple pattern
topecongiro [Sat, 12 Aug 2017 06:59:35 +0000 (15:59 +0900)]
Allow empty tuple pattern

6 years agoCargo update
topecongiro [Fri, 11 Aug 2017 08:54:54 +0000 (17:54 +0900)]
Cargo update

6 years agoRemove 'mut' notation
topecongiro [Fri, 11 Aug 2017 08:54:38 +0000 (17:54 +0900)]
Remove 'mut' notation

6 years agoUpdate tests
topecongiro [Fri, 11 Aug 2017 08:54:30 +0000 (17:54 +0900)]
Update tests

6 years agoUpdate tests
topecongiro [Fri, 11 Aug 2017 08:54:20 +0000 (17:54 +0900)]
Update tests

6 years agoAllow attributes to stay on the same line with fields
topecongiro [Fri, 11 Aug 2017 08:52:49 +0000 (17:52 +0900)]
Allow attributes to stay on the same line with fields

6 years agoGeneralize combine_attr_and_expr
topecongiro [Fri, 11 Aug 2017 08:52:13 +0000 (17:52 +0900)]
Generalize combine_attr_and_expr

6 years agoFormat
sinkuu [Fri, 11 Aug 2017 07:17:12 +0000 (16:17 +0900)]
Format

6 years agoRemove unnecessary blank lines at the start and the end of a block
sinkuu [Fri, 11 Aug 2017 07:15:28 +0000 (16:15 +0900)]
Remove unnecessary blank lines at the start and the end of a block

6 years agoMerge pull request #1870 from topecongiro/missing-comments-in-fn
Nick Cameron [Fri, 11 Aug 2017 05:07:44 +0000 (17:07 +1200)]
Merge pull request #1870 from topecongiro/missing-comments-in-fn

Cover comments between function args and the brace

6 years agoCover comments between function args and the brace
topecongiro [Thu, 10 Aug 2017 14:10:41 +0000 (23:10 +0900)]
Cover comments between function args and the brace

6 years agoMerge pull request #1869 from topecongiro/configs-error_on_line_overflow_comments
Nick Cameron [Wed, 9 Aug 2017 23:36:39 +0000 (11:36 +1200)]
Merge pull request #1869 from topecongiro/configs-error_on_line_overflow_comments

Add error_on_line_overflow_comments config option

6 years agoAdd error_on_line_overflow_comments config option
topecongiro [Wed, 9 Aug 2017 23:13:20 +0000 (08:13 +0900)]
Add error_on_line_overflow_comments config option

6 years agoMerge pull request #1861 from topecongiro/refactor-chain
Nick Cameron [Wed, 9 Aug 2017 21:03:45 +0000 (09:03 +1200)]
Merge pull request #1861 from topecongiro/refactor-chain

Remove unnecessary rewriting

6 years agoMerge pull request #1864 from topecongiro/reorder-extern-crates
Nick Cameron [Wed, 9 Aug 2017 08:45:49 +0000 (20:45 +1200)]
Merge pull request #1864 from topecongiro/reorder-extern-crates

Reorder extern crates

6 years agoFix a typo
topecongiro [Mon, 7 Aug 2017 08:32:31 +0000 (17:32 +0900)]
Fix a typo

6 years agoAvoid rewriting the last argument whenever possible
topecongiro [Mon, 7 Aug 2017 08:30:32 +0000 (17:30 +0900)]
Avoid rewriting the last argument whenever possible

6 years agoAdd leave_last field to ListItems
topecongiro [Mon, 7 Aug 2017 08:29:55 +0000 (17:29 +0900)]
Add leave_last field to ListItems

6 years agoFormat source codes and update tests
Seiichi Uchida [Mon, 7 Aug 2017 06:17:57 +0000 (15:17 +0900)]
Format source codes and update tests

6 years agoAvoid trial and error in rewrite_chain whenever possible
Seiichi Uchida [Mon, 7 Aug 2017 06:17:35 +0000 (15:17 +0900)]
Avoid trial and error in rewrite_chain whenever possible

6 years agoHandle prefix and suffix try operators differently
Seiichi Uchida [Sun, 6 Aug 2017 13:56:51 +0000 (22:56 +0900)]
Handle prefix and suffix try operators differently

6 years agoMerge pull request #1863 from topecongiro/issue-1862
Nick Cameron [Wed, 9 Aug 2017 07:16:42 +0000 (19:16 +1200)]
Merge pull request #1863 from topecongiro/issue-1862

Keep the pre-comment on the same line with item if it fits max width

6 years agoFormat source codes and update tests
topecongiro [Tue, 8 Aug 2017 15:16:35 +0000 (00:16 +0900)]
Format source codes and update tests

6 years agoAdd reorder_extern_crates and reorder_extern_crates_in_group config options
topecongiro [Tue, 8 Aug 2017 15:16:18 +0000 (00:16 +0900)]
Add reorder_extern_crates and reorder_extern_crates_in_group config options

6 years agoKeep the pre-comment on the same line with item if it fits max width
topecongiro [Tue, 8 Aug 2017 09:24:06 +0000 (18:24 +0900)]
Keep the pre-comment on the same line with item if it fits max width

6 years agoMerge pull request #1859 from porglezomp-misc/master
Nick Cameron [Mon, 7 Aug 2017 03:43:14 +0000 (15:43 +1200)]
Merge pull request #1859 from porglezomp-misc/master

Fix #1858 - "Don't erase a use with attributes attached"

6 years agoMove the empty path_list handling into rewrite_use_list()
Caleb Jones [Mon, 7 Aug 2017 03:04:33 +0000 (23:04 -0400)]
Move the empty path_list handling into rewrite_use_list()

6 years agoFix #1858 - "Don't erase a use with attributes attached"
Caleb Jones [Sun, 6 Aug 2017 23:42:07 +0000 (19:42 -0400)]
Fix #1858 - "Don't erase a use with attributes attached"

This prevents code like

    #[cfg(unix)]
    pub use self::unix::{};

from becoming

    #[cfg(unix)]

which would cause the attribute to be attached to the next item.

6 years agoMerge pull request #1855 from topecongiro/inner-outer-attrs
Nick Cameron [Sat, 5 Aug 2017 23:24:38 +0000 (11:24 +1200)]
Merge pull request #1855 from topecongiro/inner-outer-attrs

Format inner attributes in match expr

6 years agoUpdate tests
topecongiro [Sat, 5 Aug 2017 06:24:20 +0000 (15:24 +0900)]
Update tests

6 years agoFormat inner attributes in match expr
topecongiro [Sat, 5 Aug 2017 06:24:12 +0000 (15:24 +0900)]
Format inner attributes in match expr

6 years agoDo not add missing snippet between arms if it's just spaces
topecongiro [Sat, 5 Aug 2017 06:23:23 +0000 (15:23 +0900)]
Do not add missing snippet between arms if it's just spaces

6 years agoDo not take inner attributes into account for span
topecongiro [Sat, 5 Aug 2017 06:21:46 +0000 (15:21 +0900)]
Do not take inner attributes into account for span

6 years agoMerge pull request #1848 from topecongiro/refactor-rewrite-where-clause
Nick Cameron [Wed, 2 Aug 2017 23:28:16 +0000 (11:28 +1200)]
Merge pull request #1848 from topecongiro/refactor-rewrite-where-clause

Refactor `rewrite_where_clause()`

6 years agoUpdate tests
Seiichi Uchida [Wed, 2 Aug 2017 14:28:52 +0000 (23:28 +0900)]
Update tests

6 years agoInsert newline between type alias with where clause
Seiichi Uchida [Wed, 2 Aug 2017 14:27:33 +0000 (23:27 +0900)]
Insert newline between type alias with where clause

6 years agoSimplify comments separator
Seiichi Uchida [Wed, 2 Aug 2017 14:27:19 +0000 (23:27 +0900)]
Simplify comments separator

6 years agoFactor out boolean flags for rewrite_where_clause()
Seiichi Uchida [Wed, 2 Aug 2017 14:26:35 +0000 (23:26 +0900)]
Factor out boolean flags for rewrite_where_clause()

6 years agoMerge pull request #1847 from topecongiro/issue-1843
Nick Cameron [Wed, 2 Aug 2017 02:28:48 +0000 (14:28 +1200)]
Merge pull request #1847 from topecongiro/issue-1843

Implement single-line where

6 years agoMerge pull request #1846 from topecongiro/where-clause-span
Nick Cameron [Wed, 2 Aug 2017 02:23:58 +0000 (14:23 +1200)]
Merge pull request #1846 from topecongiro/where-clause-span

Use Span from ast::WhereClause

6 years agoUpdate tests
Seiichi Uchida [Tue, 1 Aug 2017 13:26:37 +0000 (22:26 +0900)]
Update tests

6 years agoImplement compressed where clause with Rfc style
Seiichi Uchida [Tue, 1 Aug 2017 13:26:22 +0000 (22:26 +0900)]
Implement compressed where clause with Rfc style

6 years agoRefactor compute_budgets_for_args()
Seiichi Uchida [Tue, 1 Aug 2017 13:25:26 +0000 (22:25 +0900)]
Refactor compute_budgets_for_args()

6 years agoRefactoring
Seiichi Uchida [Tue, 1 Aug 2017 13:23:12 +0000 (22:23 +0900)]
Refactoring

6 years agoSet where_density default value to Density::Vertical
Seiichi Uchida [Tue, 1 Aug 2017 13:20:04 +0000 (22:20 +0900)]
Set where_density default value to Density::Vertical

6 years agoAdd format_constness() and last_line_used_width()
Seiichi Uchida [Tue, 1 Aug 2017 13:19:20 +0000 (22:19 +0900)]
Add format_constness() and last_line_used_width()

6 years agoUse Span from ast::WhereClause
topecongiro [Tue, 1 Aug 2017 09:36:36 +0000 (18:36 +0900)]
Use Span from ast::WhereClause

6 years agoMerge pull request #1840 from topecongiro/match-with-max-width
Nick Cameron [Tue, 1 Aug 2017 01:51:23 +0000 (13:51 +1200)]
Merge pull request #1840 from topecongiro/match-with-max-width

Match with max width

6 years agoMerge pull request #1842 from emilio/rustfmt-format-diff
Nick Cameron [Tue, 1 Aug 2017 01:42:10 +0000 (13:42 +1200)]
Merge pull request #1842 from emilio/rustfmt-format-diff

bin: Add a very simple rustfmt-format-diff.

6 years agoMerge pull request #1841 from emilio/file-lines-fixes
Nick Cameron [Tue, 1 Aug 2017 01:41:04 +0000 (13:41 +1200)]
Merge pull request #1841 from emilio/file-lines-fixes

visitor: A few file lines fixes

6 years agorustfmt-format-diff: Use logging macros instead of "-v" option.
Emilio Cobos Álvarez [Mon, 31 Jul 2017 08:38:24 +0000 (09:38 +0100)]
rustfmt-format-diff: Use logging macros instead of "-v" option.

6 years agobin: Add a very simple rustfmt-format-diff.
Emilio Cobos Álvarez [Sat, 29 Jul 2017 22:59:30 +0000 (00:59 +0200)]
bin: Add a very simple rustfmt-format-diff.

This patch introduces a super-simple format-diff tool, that allows you to do:

```
git diff | rustfmt-format-diff -p 1
```

To format your current changes.

For now it doesn't accept too much customisation, and it basically calls rustfmt
with the default configuration, but more customisation can be added in the
future if needed.

6 years agovisitor: Only reorder imports if at least one of them is in file-lines.
Emilio Cobos Álvarez [Sat, 29 Jul 2017 15:07:17 +0000 (17:07 +0200)]
visitor: Only reorder imports if at least one of them is in file-lines.

6 years agovisitor: Make sure to don't eat or realign items when they should be skipped due...
Emilio Cobos Álvarez [Sat, 29 Jul 2017 15:06:50 +0000 (17:06 +0200)]
visitor: Make sure to don't eat or realign items when they should be skipped due to file-lines.

Before this patch, stuff like the argument with the comment was realigned to
column 0, even when being outside of the file_lines range.

6 years agoUpdate tests
Seiichi Uchida [Mon, 31 Jul 2017 07:24:18 +0000 (16:24 +0900)]
Update tests

6 years agoAvoid early line breaks in match condition
Seiichi Uchida [Mon, 31 Jul 2017 07:24:07 +0000 (16:24 +0900)]
Avoid early line breaks in match condition

6 years agoMake definitive_tactic more generic via enum Separator
Seiichi Uchida [Mon, 31 Jul 2017 07:23:42 +0000 (16:23 +0900)]
Make definitive_tactic more generic via enum Separator

6 years agoMerge pull request #1819 from brainlessdeveloper/fix-extern-crate-whitespace
Seiichi Uchida [Mon, 31 Jul 2017 07:21:48 +0000 (16:21 +0900)]
Merge pull request #1819 from brainlessdeveloper/fix-extern-crate-whitespace

Remove whitespace between words in extern declarations

6 years agoMerge pull request #1836 from topecongiro/issue-1835
Nick Cameron [Sun, 30 Jul 2017 21:21:32 +0000 (09:21 +1200)]
Merge pull request #1836 from topecongiro/issue-1835

More fine-grained file-lines

6 years agoMake definitive_tactic more generic with separator length
Seiichi Uchida [Sat, 29 Jul 2017 13:12:18 +0000 (22:12 +0900)]
Make definitive_tactic more generic with separator length

6 years agoRemove whitespace between extern crate declaration
Fausto Núñez Alberro [Tue, 25 Jul 2017 17:46:09 +0000 (19:46 +0200)]
Remove whitespace between extern crate declaration

6 years agoMore fine-grained file-lines
topecongiro [Sat, 29 Jul 2017 03:51:45 +0000 (12:51 +0900)]
More fine-grained file-lines

6 years agoMerge pull request #1831 from topecongiro/trait-associated-type-with-default
Nick Cameron [Sat, 29 Jul 2017 00:31:36 +0000 (12:31 +1200)]
Merge pull request #1831 from topecongiro/trait-associated-type-with-default

Fix a typo in rewrite_associated_type

6 years agoMerge pull request #1826 from topecongiro/issue-1824
Nick Cameron [Sat, 29 Jul 2017 00:11:17 +0000 (12:11 +1200)]
Merge pull request #1826 from topecongiro/issue-1824

Use correct BytePos for where when rewriting trait

6 years agoFix a typo in rewrite_associated_type
topecongiro [Thu, 27 Jul 2017 21:27:34 +0000 (06:27 +0900)]
Fix a typo in rewrite_associated_type

6 years agoUse correct BytePos for where when rewriting trait
topecongiro [Thu, 27 Jul 2017 02:09:38 +0000 (11:09 +0900)]
Use correct BytePos for where when rewriting trait

6 years agoMerge pull request #1827 from topecongiro/default-keyword
Nick Cameron [Thu, 27 Jul 2017 02:27:06 +0000 (14:27 +1200)]
Merge pull request #1827 from topecongiro/default-keyword

Format defaultness

6 years agoFormat defaultness
topecongiro [Thu, 27 Jul 2017 00:43:35 +0000 (09:43 +0900)]
Format defaultness

6 years agoMerge pull request #1822 from topecongiro/issue-1172
Nick Cameron [Wed, 26 Jul 2017 23:15:53 +0000 (11:15 +1200)]
Merge pull request #1822 from topecongiro/issue-1172

Remove newlines between list elements for expressions

6 years agoMerge pull request #1821 from topecongiro/avoid-unnecessary-line-breaks
Nick Cameron [Wed, 26 Jul 2017 23:07:17 +0000 (11:07 +1200)]
Merge pull request #1821 from topecongiro/avoid-unnecessary-line-breaks

Avoid unnecessary line breaks

6 years agoUpdate tests
Seiichi Uchida [Wed, 26 Jul 2017 13:43:50 +0000 (22:43 +0900)]
Update tests

6 years agoRemove newlines between list elements for expressions
Seiichi Uchida [Wed, 26 Jul 2017 13:43:36 +0000 (22:43 +0900)]
Remove newlines between list elements for expressions

6 years agoFormat source codes and update tests
topecongiro [Wed, 26 Jul 2017 08:43:17 +0000 (17:43 +0900)]
Format source codes and update tests

6 years agoAvoid regression
topecongiro [Wed, 26 Jul 2017 08:42:52 +0000 (17:42 +0900)]
Avoid regression

6 years agoIgnore the last line overhead when rewriting condition
topecongiro [Wed, 26 Jul 2017 08:41:45 +0000 (17:41 +0900)]
Ignore the last line overhead when rewriting condition

6 years agoSimplify rewrite_pair
topecongiro [Wed, 26 Jul 2017 08:40:57 +0000 (17:40 +0900)]
Simplify rewrite_pair

6 years agoFormat source codes and update tests
topecongiro [Wed, 26 Jul 2017 07:30:58 +0000 (16:30 +0900)]
Format source codes and update tests

6 years agoAvoid unnecessary line breaks in condition expression
topecongiro [Wed, 26 Jul 2017 07:28:55 +0000 (16:28 +0900)]
Avoid unnecessary line breaks in condition expression

6 years agoMerge pull request #1818 from topecongiro/issue-1194
Nick Cameron [Tue, 25 Jul 2017 23:40:41 +0000 (11:40 +1200)]
Merge pull request #1818 from topecongiro/issue-1194

Put braces on the next line if it exceeds max width

6 years agoMerge pull request #1817 from topecongiro/file-lines-tests
Nick Cameron [Tue, 25 Jul 2017 23:36:54 +0000 (11:36 +1200)]
Merge pull request #1817 from topecongiro/file-lines-tests

Restore comments in file-lines tests

6 years agoMerge pull request #1816 from topecongiro/struct-variant-width-0
Nick Cameron [Tue, 25 Jul 2017 23:32:42 +0000 (11:32 +1200)]
Merge pull request #1816 from topecongiro/struct-variant-width-0

Force vertical layout when struct_variant_width is 0

6 years agoUpdate tests
topecongiro [Tue, 25 Jul 2017 09:51:29 +0000 (18:51 +0900)]
Update tests

6 years agoPut braces on the next line if it exceeds max width
topecongiro [Tue, 25 Jul 2017 09:51:14 +0000 (18:51 +0900)]
Put braces on the next line if it exceeds max width

6 years agoRestore comments in file-liens tests
topecongiro [Tue, 25 Jul 2017 06:47:44 +0000 (15:47 +0900)]
Restore comments in file-liens tests

6 years agoForce vertical layout when struct_variant_width is 0
topecongiro [Tue, 25 Jul 2017 06:19:09 +0000 (15:19 +0900)]
Force vertical layout when struct_variant_width is 0

6 years agocargo update
Nick Cameron [Tue, 25 Jul 2017 03:55:18 +0000 (15:55 +1200)]
cargo update

6 years agoMerge pull request #1805 from topecongiro/inner-attr
Nick Cameron [Mon, 24 Jul 2017 23:38:59 +0000 (11:38 +1200)]
Merge pull request #1805 from topecongiro/inner-attr

Format inner attributes

6 years agoUpdate tests
Seiichi Uchida [Mon, 24 Jul 2017 15:56:09 +0000 (00:56 +0900)]
Update tests

6 years agoFormat inner attributes wherever possible
Seiichi Uchida [Mon, 24 Jul 2017 15:55:55 +0000 (00:55 +0900)]
Format inner attributes wherever possible

6 years agoSupport inner attributes
Seiichi Uchida [Mon, 24 Jul 2017 15:55:29 +0000 (00:55 +0900)]
Support inner attributes