]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge pull request #2790 from DevOrc/master
Nick Cameron [Mon, 16 Jul 2018 23:21:00 +0000 (11:21 +1200)]
Merge pull request #2790 from DevOrc/master

add emit flag documentation

5 years agoMerge pull request #2823 from fwalch/default-newline-style
Nick Cameron [Mon, 16 Jul 2018 23:18:10 +0000 (11:18 +1200)]
Merge pull request #2823 from fwalch/default-newline-style

Change default newline style to "Native"

5 years agoFix Configurations.md
Nick Cameron [Mon, 16 Jul 2018 22:45:30 +0000 (10:45 +1200)]
Fix Configurations.md

Correct default for `imports_indent`

Closes #2839

5 years agoMerge pull request #2829 from scampi/issue1210
Seiichi Uchida [Mon, 16 Jul 2018 07:07:05 +0000 (16:07 +0900)]
Merge pull request #2829 from scampi/issue1210

fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting

5 years agoremoved unused max_width argument of rewrite_string function
Stéphane Campinas [Sat, 14 Jul 2018 17:17:07 +0000 (19:17 +0200)]
removed unused max_width argument of rewrite_string function

5 years agofix rewrite_string when a line feed is present in a sequence of whitespaces, resultin...
Stéphane Campinas [Sat, 7 Jul 2018 10:24:09 +0000 (12:24 +0200)]
fix rewrite_string when a line feed is present in a sequence of whitespaces, resulting in strange formatting

5 years ago0.8.3
Seiichi Uchida [Sat, 14 Jul 2018 13:18:12 +0000 (22:18 +0900)]
0.8.3

5 years agoCargo update (#2845)
Seiichi Uchida [Sat, 14 Jul 2018 13:16:23 +0000 (22:16 +0900)]
Cargo update (#2845)

5 years agoMerge pull request #2826 from nrc/complex-struct
Seiichi Uchida [Sat, 14 Jul 2018 11:28:38 +0000 (20:28 +0900)]
Merge pull request #2826 from nrc/complex-struct

Improve formatting of lists of binops

5 years agoAdd a link to ag_dubs' CI blog post to the README
Nick Cameron [Thu, 12 Jul 2018 10:28:55 +0000 (22:28 +1200)]
Add a link to ag_dubs' CI blog post to the README

5 years agoaddress reviewer comments
Nick Cameron [Thu, 12 Jul 2018 10:21:07 +0000 (22:21 +1200)]
address reviewer comments

5 years agoAdd test for #2802
Nick Cameron [Fri, 6 Jul 2018 00:04:14 +0000 (12:04 +1200)]
Add test for #2802

5 years agoFixup formatting of tests and source
Nick Cameron [Thu, 5 Jul 2018 23:58:22 +0000 (11:58 +1200)]
Fixup formatting of tests and source

5 years agoImprove formatting of series of binop expressions
Nick Cameron [Sat, 30 Jun 2018 07:53:06 +0000 (19:53 +1200)]
Improve formatting of series of binop expressions

This commit changes the handling of binops (and potentially other pairs), where
the expressions are logically a list, e.g., `a + b + c`. It makes the single
line vs multi-line approaches explicit and introduces a lowering step.

This improves formatting in a number of places, mostly improving consistency of
formatting with very short sub-expressions, but also some weird indentation.

Closes #2802

5 years agoMove pair handling to its own module
Nick Cameron [Thu, 28 Jun 2018 00:02:05 +0000 (12:02 +1200)]
Move pair handling to its own module

5 years agoFactor out PairParts::infix
Nick Cameron [Wed, 27 Jun 2018 23:50:03 +0000 (11:50 +1200)]
Factor out PairParts::infix

5 years agoMerge pull request #2836 from topecongiro/async-closure
Nick Cameron [Mon, 9 Jul 2018 20:34:04 +0000 (08:34 +1200)]
Merge pull request #2836 from topecongiro/async-closure

Format async closure

5 years agoFormat async closure
Seiichi Uchida [Mon, 9 Jul 2018 14:20:53 +0000 (23:20 +0900)]
Format async closure

5 years agoAdd a configuration guide for edition
Seiichi Uchida [Mon, 9 Jul 2018 14:20:38 +0000 (23:20 +0900)]
Add a configuration guide for edition

5 years agoAdd a test for async closures
Seiichi Uchida [Mon, 9 Jul 2018 14:20:30 +0000 (23:20 +0900)]
Add a test for async closures

5 years agoCargo update
Seiichi Uchida [Mon, 9 Jul 2018 14:09:14 +0000 (23:09 +0900)]
Cargo update

Add `rustc-ap-syntax_pos` to dependencies.

6 years agoMerge pull request #2828 from Dentosal/patch-1
Seiichi Uchida [Fri, 6 Jul 2018 23:32:42 +0000 (08:32 +0900)]
Merge pull request #2828 from Dentosal/patch-1

Add missing equals sign to example configuration

6 years agoAdd missing equals sign to example configuration
Hannes Karppila [Fri, 6 Jul 2018 21:38:32 +0000 (00:38 +0300)]
Add missing equals sign to example configuration

6 years agoMerge pull request #2827 from ehuss/help-doc
Nick Cameron [Fri, 6 Jul 2018 08:56:29 +0000 (20:56 +1200)]
Merge pull request #2827 from ehuss/help-doc

Fix help for --help=file-lines

6 years agoFix help for --help=file-lines
Eric Huss [Fri, 6 Jul 2018 05:50:23 +0000 (22:50 -0700)]
Fix help for --help=file-lines

Due to the way getopts works, it requires the equals sign.

6 years agotest: Assert CRLF line endings on Windows
Florian Walch [Mon, 2 Jul 2018 21:43:54 +0000 (23:43 +0200)]
test: Assert CRLF line endings on Windows

6 years agoChange default newline style to "Native"
Florian Walch [Mon, 2 Jul 2018 21:16:17 +0000 (23:16 +0200)]
Change default newline style to "Native"

Fixes #2626.

6 years agoUpdate rustc-ap-syntax
Nick Cameron [Sun, 1 Jul 2018 21:34:55 +0000 (09:34 +1200)]
Update rustc-ap-syntax

6 years agoUpdate rustc-ap-syntax to 181
Nick Cameron [Sun, 1 Jul 2018 20:45:09 +0000 (08:45 +1200)]
Update rustc-ap-syntax to 181

6 years agoMerge pull request #2822 from topecongiro/issue-2782
Nick Cameron [Sun, 1 Jul 2018 02:38:30 +0000 (14:38 +1200)]
Merge pull request #2822 from topecongiro/issue-2782

Avoid panicking on deeply nested expressions

6 years agoMerge pull request #2821 from topecongiro/issue-2721
Nick Cameron [Sun, 1 Jul 2018 02:37:30 +0000 (14:37 +1200)]
Merge pull request #2821 from topecongiro/issue-2721

Return the trimmed original snippet when formatting macro def failed

6 years agoFlatten multiple empty blocks at once
topecongiro [Sun, 1 Jul 2018 01:51:36 +0000 (10:51 +0900)]
Flatten multiple empty blocks at once

6 years agoFactor out block_can_be_flattened
topecongiro [Sun, 1 Jul 2018 01:49:05 +0000 (10:49 +0900)]
Factor out block_can_be_flattened

6 years agoAvoid panicking on deeply nested expressions
topecongiro [Sun, 1 Jul 2018 01:46:32 +0000 (10:46 +0900)]
Avoid panicking on deeply nested expressions

6 years agoAdd a test for #2782
topecongiro [Sun, 1 Jul 2018 01:40:47 +0000 (10:40 +0900)]
Add a test for #2782

6 years agoReturn the trimmed original snippet when formatting macro def failed
topecongiro [Sun, 1 Jul 2018 00:59:53 +0000 (09:59 +0900)]
Return the trimmed original snippet when formatting macro def failed

6 years agoAdd a test for #2721
topecongiro [Sun, 1 Jul 2018 00:59:45 +0000 (09:59 +0900)]
Add a test for #2721

6 years agoMerge pull request #2820 from scampi/defaults
Nick Cameron [Sat, 30 Jun 2018 22:57:31 +0000 (10:57 +1200)]
Merge pull request #2820 from scampi/defaults

[wip] remove some defaults

6 years agoMerge pull request #2819 from topecongiro/duplicated-paren
Nick Cameron [Sat, 30 Jun 2018 22:55:03 +0000 (10:55 +1200)]
Merge pull request #2819 from topecongiro/duplicated-paren

Avoid inserting the closing paren after tuple struct containing parentheses and a where clause

6 years agoreverted some defaults for tests that are fixing a specific issue
Stéphane Campinas [Sat, 30 Jun 2018 15:03:31 +0000 (17:03 +0200)]
reverted some defaults for tests that are fixing a specific issue

6 years agowarn on use of default value for an option
Stéphane Campinas [Sat, 30 Jun 2018 15:03:18 +0000 (17:03 +0200)]
warn on use of default value for an option

6 years agoCargo update
topecongiro [Sat, 30 Jun 2018 12:36:38 +0000 (21:36 +0900)]
Cargo update

Update `rustc-ap-*` to 180.0.0.

6 years agoFix span bug when searching for the closing paren
topecongiro [Sat, 30 Jun 2018 10:21:15 +0000 (19:21 +0900)]
Fix span bug when searching for the closing paren

6 years agoAdd tests for #2818
topecongiro [Sat, 30 Jun 2018 10:20:47 +0000 (19:20 +0900)]
Add tests for #2818

6 years agoFix compile error from breaking changes in libsyntax
topecongiro [Sat, 30 Jun 2018 06:53:28 +0000 (15:53 +0900)]
Fix compile error from breaking changes in libsyntax

6 years agoCargo update
topecongiro [Sat, 30 Jun 2018 06:53:22 +0000 (15:53 +0900)]
Cargo update

6 years agoMerge pull request #2814 from topecongiro/rustc-ap-syntax
Nick Cameron [Thu, 28 Jun 2018 09:52:55 +0000 (21:52 +1200)]
Merge pull request #2814 from topecongiro/rustc-ap-syntax

Cargo update

6 years agoFix compile errors from breaking changes
Seiichi Uchida [Thu, 28 Jun 2018 07:26:10 +0000 (16:26 +0900)]
Fix compile errors from breaking changes

6 years agoCargo update
Seiichi Uchida [Thu, 28 Jun 2018 07:10:49 +0000 (16:10 +0900)]
Cargo update

Update `rustc-ap-*` to 177.0.0.

6 years agoMerge pull request #2809 from nrc/formatting
Seiichi Uchida [Thu, 28 Jun 2018 03:30:51 +0000 (12:30 +0900)]
Merge pull request #2809 from nrc/formatting

Some formatting fixes

6 years agoMerge pull request #2811 from bemeurer/master
Seiichi Uchida [Thu, 28 Jun 2018 03:19:03 +0000 (12:19 +0900)]
Merge pull request #2811 from bemeurer/master

Fixed typo Yess -> Yes

6 years agoFixed typo Yess -> Yes
Bernardo Meurer [Thu, 28 Jun 2018 01:27:20 +0000 (18:27 -0700)]
Fixed typo Yess -> Yes

6 years agounecessary use of rustfmt-normalize_comments comment
Stéphane Campinas [Wed, 27 Jun 2018 00:26:54 +0000 (02:26 +0200)]
unecessary use of rustfmt-normalize_comments comment

6 years agoformatting
Stéphane Campinas [Tue, 26 Jun 2018 23:23:27 +0000 (01:23 +0200)]
formatting

6 years agoremoved comment with default: rustfmt-remove_nested_parens
Stéphane Campinas [Tue, 26 Jun 2018 23:11:39 +0000 (01:11 +0200)]
removed comment with default: rustfmt-remove_nested_parens

6 years agoremoved comment with default: rustfmt-reorder_modules
Stéphane Campinas [Tue, 26 Jun 2018 23:10:05 +0000 (01:10 +0200)]
removed comment with default: rustfmt-reorder_modules

6 years agoremoved comment with default: rustfmt-imports_indent
Stéphane Campinas [Tue, 26 Jun 2018 23:05:25 +0000 (01:05 +0200)]
removed comment with default: rustfmt-imports_indent

6 years agoremoved comment with default: rustfmt-reorder_imports
Stéphane Campinas [Tue, 26 Jun 2018 23:01:56 +0000 (01:01 +0200)]
removed comment with default: rustfmt-reorder_imports

6 years agoremoved comment with default: rustfmt-format_strings
Stéphane Campinas [Tue, 26 Jun 2018 22:59:27 +0000 (00:59 +0200)]
removed comment with default: rustfmt-format_strings

6 years agoremoved comment with default: rustfmt-control_brace_style
Stéphane Campinas [Tue, 26 Jun 2018 22:55:34 +0000 (00:55 +0200)]
removed comment with default: rustfmt-control_brace_style

6 years agoremoved comment with default: rustfmt-brace_style
Stéphane Campinas [Tue, 26 Jun 2018 22:53:58 +0000 (00:53 +0200)]
removed comment with default: rustfmt-brace_style

6 years agoremoved comment with default: rustfmt-max_width
Stéphane Campinas [Tue, 26 Jun 2018 22:51:37 +0000 (00:51 +0200)]
removed comment with default: rustfmt-max_width

6 years agoremoved comment with default: rustfmt-error_on_line_overflow
Stéphane Campinas [Tue, 26 Jun 2018 22:48:33 +0000 (00:48 +0200)]
removed comment with default: rustfmt-error_on_line_overflow

6 years agoremoved comment with default: rustfmt-normalize_comments
Stéphane Campinas [Tue, 26 Jun 2018 22:26:17 +0000 (00:26 +0200)]
removed comment with default: rustfmt-normalize_comments

6 years agoremoved comment with default: rustfmt-indent_style
Stéphane Campinas [Tue, 26 Jun 2018 22:24:02 +0000 (00:24 +0200)]
removed comment with default: rustfmt-indent_style

6 years agoApply short function call heuristic to attributes
Nick Cameron [Tue, 26 Jun 2018 03:15:29 +0000 (15:15 +1200)]
Apply short function call heuristic to attributes

Closes #2620

6 years agoRefactor and fixup attribute formatting
Nick Cameron [Tue, 26 Jun 2018 02:58:51 +0000 (14:58 +1200)]
Refactor and fixup attribute formatting

Preserves trailing commas (except in derives where we follow function args).
Correctly uses `#` vs `#!` for derives.
Uses block indent for derives, fixes #2805.

6 years agoIndent a match guard if the pattern is multiline
Nick Cameron [Mon, 25 Jun 2018 00:16:17 +0000 (12:16 +1200)]
Indent a match guard if the pattern is multiline

Closes #2377

6 years agoMerge pull request #2807 from topecongiro/raw-identifiers
Nick Cameron [Mon, 25 Jun 2018 20:24:34 +0000 (08:24 +1200)]
Merge pull request #2807 from topecongiro/raw-identifiers

Handle raw identifiers

6 years agoAdd more tests
Seiichi Uchida [Mon, 25 Jun 2018 14:41:44 +0000 (23:41 +0900)]
Add more tests

6 years agoHandle raw identifiers
Seiichi Uchida [Mon, 25 Jun 2018 14:36:45 +0000 (23:36 +0900)]
Handle raw identifiers

6 years agoAdd a test for raw identifiers
Seiichi Uchida [Mon, 25 Jun 2018 14:36:37 +0000 (23:36 +0900)]
Add a test for raw identifiers

6 years agoMerge pull request #2804 from Mike-Baker/mb-strip-vert-in-match-arms
Nick Cameron [Mon, 25 Jun 2018 09:02:24 +0000 (21:02 +1200)]
Merge pull request #2804 from Mike-Baker/mb-strip-vert-in-match-arms

Strip leading `|` in match arm patterns

6 years agoMerge pull request #2806 from topecongiro/rustc-ap-syntax
Nick Cameron [Mon, 25 Jun 2018 08:59:31 +0000 (20:59 +1200)]
Merge pull request #2806 from topecongiro/rustc-ap-syntax

Update rustc-ap-* to 174.0.0

6 years agoAdd a test for #2791
topecongiro [Mon, 25 Jun 2018 06:27:09 +0000 (15:27 +0900)]
Add a test for #2791

Closes #2791.

6 years agoFix compile errors from breaking changes in libsyntax
topecongiro [Mon, 25 Jun 2018 06:24:00 +0000 (15:24 +0900)]
Fix compile errors from breaking changes in libsyntax

cc https://github.com/rust-lang/rust/pull/48149.

6 years agoCargo update
topecongiro [Mon, 25 Jun 2018 04:58:00 +0000 (13:58 +0900)]
Cargo update

Update rustc-ap-* to 174.0.0.

6 years agoStrip leading `|` in match arm patterns
Mike Baker [Sat, 14 Apr 2018 09:21:54 +0000 (10:21 +0100)]
Strip leading `|` in match arm patterns

This addresses issue #2621

This commit turns out to be a partial revert of
ea3c01e3374143912f048b22fda106ee8d5a1cd8

The rationale is that a `|` character preceding a match pattern is not
semantically relevant and therefore should be considered a
style/formatting choice.

A discussion concluded that the best way to emit consistent formatting
here was to strip the leading `|`

This removes the match_with_beginning_vert test because it was asserting
the old behaviour which has been changed, it adds a new test
(issue_2621) which should be a more comprehensive check of the behavior
of `|` in match arms.

Discussion at https://github.com/rust-lang-nursery/fmt-rfcs/issues/119

6 years agoTODO -> FIXME
Nick Cameron [Fri, 22 Jun 2018 02:41:17 +0000 (14:41 +1200)]
TODO -> FIXME

Or just delete

Closes #25

6 years agoMerge pull request #2799 from lo48576/fix/config-doc
Nick Cameron [Thu, 21 Jun 2018 03:21:23 +0000 (15:21 +1200)]
Merge pull request #2799 from lo48576/fix/config-doc

Remove wrong "(default)" from `Configurations.md`

6 years agoRemove wrong "(default)"
YOSHIOKA Takuma [Thu, 21 Jun 2018 02:42:09 +0000 (11:42 +0900)]
Remove wrong "(default)"

`blank_lines_upper_bound` has default value `1`, not `2`.

6 years agoMerge pull request #2795 from jechase/issue-2794
Nick Cameron [Tue, 19 Jun 2018 22:35:16 +0000 (10:35 +1200)]
Merge pull request #2795 from jechase/issue-2794

Add test and fix for #2794

6 years agoMerge pull request #2785 from wada314/issue-2728
Nick Cameron [Tue, 19 Jun 2018 22:32:46 +0000 (10:32 +1200)]
Merge pull request #2785 from wada314/issue-2728

Fix #2728.

6 years agoadd emit flag documentation
DevOrc [Sat, 16 Jun 2018 20:12:21 +0000 (16:12 -0400)]
add emit flag documentation

6 years agoAdd flag to the ListFormatting struct for nested imports
Josh Chase [Tue, 19 Jun 2018 15:28:58 +0000 (11:28 -0400)]
Add flag to the ListFormatting struct for nested imports

6 years agoRemove NestedImport tactic
Josh Chase [Tue, 19 Jun 2018 15:28:00 +0000 (11:28 -0400)]
Remove NestedImport tactic

6 years agoSwitch to comments for rustfmt config
Josh Chase [Tue, 19 Jun 2018 13:30:50 +0000 (09:30 -0400)]
Switch to comments for rustfmt config

6 years agoFix #2728.
Shohei Wada [Wed, 13 Jun 2018 12:54:06 +0000 (21:54 +0900)]
Fix #2728.

6 years agoRemove some unnecessary `pub`s
Nick Cameron [Tue, 19 Jun 2018 02:36:50 +0000 (14:36 +1200)]
Remove some unnecessary `pub`s

6 years agoChange `use_small_heuristics` to an enum and stabilise
Nick Cameron [Tue, 19 Jun 2018 01:26:36 +0000 (13:26 +1200)]
Change `use_small_heuristics` to an enum and stabilise

Since it is now an enum, we can be future compatible since we can add variants
for different heuristics.

Closes #1974

6 years agoMerge pull request #2793 from rust-lang-nursery/integr-test-fail
Nick Cameron [Mon, 18 Jun 2018 22:40:21 +0000 (10:40 +1200)]
Merge pull request #2793 from rust-lang-nursery/integr-test-fail

Don't fail integration tests if the subject is not passing its own tests

6 years agoMerge pull request #2788 from gnzlbg/test_check_fmt
Nick Cameron [Mon, 18 Jun 2018 22:12:06 +0000 (10:12 +1200)]
Merge pull request #2788 from gnzlbg/test_check_fmt

test cargo fmt --all -- --check returns success after formatting

6 years agoAdd test for #2794
Josh Chase [Mon, 18 Jun 2018 16:50:13 +0000 (12:50 -0400)]
Add test for #2794

6 years agodo not fix chalk
gnzlbg [Mon, 18 Jun 2018 08:43:07 +0000 (10:43 +0200)]
do not fix chalk

6 years agoDon't fail integration tests if the subject is not passing its own tests
Nick Cameron [Mon, 18 Jun 2018 08:17:07 +0000 (20:17 +1200)]
Don't fail integration tests if the subject is not passing its own tests

As suggested in https://github.com/rust-lang-nursery/rustfmt/pull/2715#issuecomment-390397152

6 years agofix chalk build
gnzlbg [Mon, 18 Jun 2018 08:04:21 +0000 (10:04 +0200)]
fix chalk build

6 years agorust-semverver build properly
gnzlbg [Mon, 18 Jun 2018 07:50:20 +0000 (09:50 +0200)]
rust-semverver build properly

6 years agoupdate issues; allow stdsimd to fail
gnzlbg [Mon, 18 Jun 2018 07:49:17 +0000 (09:49 +0200)]
update issues; allow stdsimd to fail

6 years agopreserve pipe error status (tee always succeeds); check fmt before running tests
gnzlbg [Fri, 15 Jun 2018 13:07:32 +0000 (15:07 +0200)]
preserve pipe error status (tee always succeeds); check fmt before running tests

6 years agotest cargo fmt --all -- --check returns success after formatting
gnzlbg [Fri, 15 Jun 2018 12:20:39 +0000 (14:20 +0200)]
test cargo fmt --all -- --check returns success after formatting