]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoMerge pull request #3042 from topecongiro/issue-3040
Nick Cameron [Fri, 21 Sep 2018 02:25:21 +0000 (14:25 +1200)]
Merge pull request #3042 from topecongiro/issue-3040

Do not trim a block from expression if its condition will go multi-line

5 years agoDo not trim a block from expression if its condition will go multi-line
Seiichi Uchida [Thu, 20 Sep 2018 15:58:47 +0000 (00:58 +0900)]
Do not trim a block from expression if its condition will go multi-line

5 years agoAdd a test for #3040
Seiichi Uchida [Thu, 20 Sep 2018 15:57:46 +0000 (00:57 +0900)]
Add a test for #3040

5 years agoMerge pull request #3036 from topecongiro/issue-2932
Nick Cameron [Wed, 19 Sep 2018 23:36:46 +0000 (11:36 +1200)]
Merge pull request #3036 from topecongiro/issue-2932

Combine chain items only when the item gets orphaned otherwise

5 years agoMerge pull request #3035 from topecongiro/issue-3006
Nick Cameron [Wed, 19 Sep 2018 23:33:47 +0000 (11:33 +1200)]
Merge pull request #3035 from topecongiro/issue-3006

Format generics on associated types

5 years agoCargo fmt
Seiichi Uchida [Wed, 19 Sep 2018 14:22:26 +0000 (23:22 +0900)]
Cargo fmt

5 years agoFix shape for index
Seiichi Uchida [Wed, 19 Sep 2018 14:21:07 +0000 (23:21 +0900)]
Fix shape for index

5 years agoCombine chain items only when the item will get orphaned
Seiichi Uchida [Wed, 19 Sep 2018 14:20:43 +0000 (23:20 +0900)]
Combine chain items only when the item will get orphaned

5 years agoUpdate tests
Seiichi Uchida [Wed, 19 Sep 2018 14:19:24 +0000 (23:19 +0900)]
Update tests

5 years agoFormat generics on associated types
Seiichi Uchida [Wed, 19 Sep 2018 13:33:10 +0000 (22:33 +0900)]
Format generics on associated types

5 years agoAdd a test for #3006
Seiichi Uchida [Wed, 19 Sep 2018 13:20:42 +0000 (22:20 +0900)]
Add a test for #3006

5 years agoMerge pull request #3028 from scampi/issue2973
Nick Cameron [Tue, 18 Sep 2018 23:31:28 +0000 (11:31 +1200)]
Merge pull request #3028 from scampi/issue2973

Fix indent computation of a macro with braces.

5 years agoMerge pull request #3002 from lqd/normalize-doc-attributes
Nick Cameron [Tue, 18 Sep 2018 23:05:27 +0000 (11:05 +1200)]
Merge pull request #3002 from lqd/normalize-doc-attributes

normalize_doc_attributes option: convert doc attributes to comments

5 years agoMerge pull request #3001 from scampi/issue2977
Nick Cameron [Tue, 18 Sep 2018 22:43:21 +0000 (10:43 +1200)]
Merge pull request #3001 from scampi/issue2977

propagate errors about failing to rewrite a macro

5 years agoMerge pull request #3014 from PSeitz/master
Nick Cameron [Tue, 18 Sep 2018 22:42:16 +0000 (10:42 +1200)]
Merge pull request #3014 from PSeitz/master

fixes #2914 by handling BadIssue case

5 years agoMerge pull request #3013 from YaLTeR/fix-issue-2985
Seiichi Uchida [Tue, 18 Sep 2018 11:21:21 +0000 (20:21 +0900)]
Merge pull request #3013 from YaLTeR/fix-issue-2985

Fix wrong shape for last chain items for indent_style = "Visual"

5 years agoImprove error message when failing cargo metadata (#3024)
Nathan Sutton [Tue, 18 Sep 2018 11:20:07 +0000 (06:20 -0500)]
Improve error message when failing cargo metadata (#3024)

5 years agoMerge pull request #3019 from yangby-cryptape/fix-typo-in-readme
Seiichi Uchida [Tue, 18 Sep 2018 11:18:24 +0000 (20:18 +0900)]
Merge pull request #3019 from yangby-cryptape/fix-typo-in-readme

Fix typo in README.md.

5 years agoMerge pull request #3017 from matthiaskrgr/typo
Seiichi Uchida [Tue, 18 Sep 2018 11:17:59 +0000 (20:17 +0900)]
Merge pull request #3017 from matthiaskrgr/typo

cargo fmt: fix typo in format_crate(): (verison -> version)

5 years agoMerge pull request #3012 from YaLTeR/fix-issue-2496
Nick Cameron [Tue, 18 Sep 2018 09:12:12 +0000 (21:12 +1200)]
Merge pull request #3012 from YaLTeR/fix-issue-2496

Fix match arm block flattening

5 years agoFix indent computation of a macro with braces.
Stéphane Campinas [Mon, 17 Sep 2018 21:17:36 +0000 (23:17 +0200)]
Fix indent computation of a macro with braces.

The leading whitespace of a multine string was taken into account when
computing the `min_prefix_space_width`, even if that line couldn't be
trimmed. The consequence is it was always shifting the macro's content
to the right.

5 years agoFix typo in README.md.
Boyu Yang [Thu, 13 Sep 2018 02:01:34 +0000 (10:01 +0800)]
Fix typo in README.md.

5 years agoadd test ensuring only doc = "" attributes are normalized to comments
Rémy Rakic [Thu, 13 Sep 2018 00:40:24 +0000 (02:40 +0200)]
add test ensuring only doc = "" attributes are normalized to comments

The other shapes of doc attributes shouldn't be normalized or modified.

5 years agoadd tests interleaving doc attrib comments and regular comments
Rémy Rakic [Thu, 13 Sep 2018 00:27:09 +0000 (02:27 +0200)]
add tests interleaving doc attrib comments and regular comments

5 years agoaddress review comment in Attribute rewrite fn
Rémy Rakic [Wed, 12 Sep 2018 23:13:07 +0000 (01:13 +0200)]
address review comment in Attribute rewrite fn

5 years agoadd non-regression test to existing attributes
Rémy Rakic [Wed, 12 Sep 2018 23:10:57 +0000 (01:10 +0200)]
add non-regression test to existing attributes

when `normalize_doc_attributes` is on, they shouldn't be affected

5 years agoadd non-regression test to existing doc attributes
Rémy Rakic [Wed, 12 Sep 2018 23:06:02 +0000 (01:06 +0200)]
add non-regression test to existing doc attributes

when `normalize_doc_attributes` is off, they shouldn't be normalized to a doc comment

5 years agoadd test with multiple levels of indents
Rémy Rakic [Wed, 12 Sep 2018 23:02:11 +0000 (01:02 +0200)]
add test with multiple levels of indents

5 years agomove config attribute
Rémy Rakic [Wed, 12 Sep 2018 22:37:31 +0000 (00:37 +0200)]
move config attribute

5 years agocargo fmt: fix typo in format_crate(): (verison -> version)
Matthias Krüger [Wed, 12 Sep 2018 19:43:31 +0000 (21:43 +0200)]
cargo fmt: fix typo in format_crate(): (verison -> version)

5 years agoimplement Drop from FmtVisitor in order to simplify failures passing
Stéphane Campinas [Wed, 12 Sep 2018 11:09:07 +0000 (13:09 +0200)]
implement Drop from FmtVisitor in order to simplify failures passing

5 years agoMerge pull request #3000 from dimbleby/dch/typo
Nick Cameron [Wed, 12 Sep 2018 03:33:18 +0000 (15:33 +1200)]
Merge pull request #3000 from dimbleby/dch/typo

Fix typo in usage text

5 years agoMerge pull request #2998 from ReapOmen/fix-rustfmt-diff-output
Nick Cameron [Wed, 12 Sep 2018 03:32:27 +0000 (15:32 +1200)]
Merge pull request #2998 from ReapOmen/fix-rustfmt-diff-output

Change `print_diff` to output the correct line number.

5 years agoMerge pull request #3010 from topecongiro/issue-3009
Nick Cameron [Wed, 12 Sep 2018 01:55:41 +0000 (13:55 +1200)]
Merge pull request #3010 from topecongiro/issue-3009

Refactor the corner case of handling long function

5 years agoMerge pull request #3011 from topecongiro/rustc-ap-syntax
Nick Cameron [Wed, 12 Sep 2018 01:55:06 +0000 (13:55 +1200)]
Merge pull request #3011 from topecongiro/rustc-ap-syntax

Cargo update

5 years agoMerge pull request #3015 from YaLTeR/fix-fn-type-comma
Nick Cameron [Wed, 12 Sep 2018 01:54:23 +0000 (13:54 +1200)]
Merge pull request #3015 from YaLTeR/fix-fn-type-comma

Fix extra new line in fn type aliases with indent_style = "Visual"

5 years agoDon't insert a new line when fn has no return type
Ivan Molodetskikh [Tue, 11 Sep 2018 09:34:33 +0000 (12:34 +0300)]
Don't insert a new line when fn has no return type

5 years agoAdd a visual fn type alias test
Ivan Molodetskikh [Tue, 11 Sep 2018 09:34:21 +0000 (12:34 +0300)]
Add a visual fn type alias test

5 years agofixes #2914 by handling BadIssue case
Pascal Seitz [Tue, 11 Sep 2018 08:46:39 +0000 (10:46 +0200)]
fixes #2914 by handling BadIssue case

5 years agoFix last chain item shape for Visual indent_style
Ivan Molodetskikh [Tue, 11 Sep 2018 08:08:28 +0000 (11:08 +0300)]
Fix last chain item shape for Visual indent_style

5 years agoAdd a test for #2985
Ivan Molodetskikh [Tue, 11 Sep 2018 08:09:17 +0000 (11:09 +0300)]
Add a test for #2985

5 years agoUse correct heuristic for match block flattening
Ivan Molodetskikh [Tue, 11 Sep 2018 05:41:16 +0000 (08:41 +0300)]
Use correct heuristic for match block flattening

5 years agoAdd a test for match flattening
Ivan Molodetskikh [Tue, 11 Sep 2018 05:31:35 +0000 (08:31 +0300)]
Add a test for match flattening

5 years agoAdd a test for #2496
Ivan Molodetskikh [Fri, 31 Aug 2018 14:51:36 +0000 (17:51 +0300)]
Add a test for #2496

5 years agoCargo update
Seiichi Uchida [Tue, 11 Sep 2018 04:52:46 +0000 (13:52 +0900)]
Cargo update

5 years agoRefactor the corner case of handling long function
Seiichi Uchida [Tue, 11 Sep 2018 04:31:37 +0000 (13:31 +0900)]
Refactor the corner case of handling long function

5 years agoAdd a test for #3009
Seiichi Uchida [Tue, 11 Sep 2018 04:30:36 +0000 (13:30 +0900)]
Add a test for #3009

5 years agoMerge pull request #2988 from YaLTeR/fix-issue-2922
Nick Cameron [Tue, 11 Sep 2018 03:50:13 +0000 (15:50 +1200)]
Merge pull request #2988 from YaLTeR/fix-issue-2922

Use correct indent in rewrite_bare_fn with Visual style

5 years agoMerge pull request #3007 from alexcrichton/wasm
Nick Cameron [Sun, 9 Sep 2018 21:50:49 +0000 (09:50 +1200)]
Merge pull request #3007 from alexcrichton/wasm

Support platforms without a timer

5 years agoSupport platforms without a timer
Alex Crichton [Sun, 9 Sep 2018 18:12:13 +0000 (11:12 -0700)]
Support platforms without a timer

I've dabbled recently in seeing how hard it would be to compile rustfmt to wasm
and then run it in a web browser, and it turns out that it's [not too
hard][wasm]! In addition to patching a few dependencies which already have a
number of patches out rustfmt also needed some modifications to get it to work,
namely avoiding the usage of `Instant::now()` on the "happy path" which doesn't
work on wasm (it just panics).

This commit is an attempt to add a support for this by avoiding using
`Instant::now()` on the wasm target, but panicking if the actual time elapsed is
requested (which doesn't happen unless verbosely logging I believe).

[wasm]: https://alexcrichton.github.io/rustfmt-wasm/

5 years agonormalize_doc_attributes option: convert doc attributes to comments
lqd [Fri, 7 Sep 2018 17:51:21 +0000 (19:51 +0200)]
normalize_doc_attributes option: convert doc attributes to comments

Convert `#![doc]` and `#[doc]` attributes to `//!` and `///` doc comments.

5 years agopropagate errors about failing to rewrite a macro
Stéphane Campinas [Fri, 7 Sep 2018 12:48:52 +0000 (14:48 +0200)]
propagate errors about failing to rewrite a macro

5 years agoFix typo in usage text
David Hotham [Fri, 7 Sep 2018 08:01:44 +0000 (09:01 +0100)]
Fix typo in usage text

5 years agoChange `print_diff` to output the correct line number.
Robert Bartlensky [Thu, 6 Sep 2018 16:16:48 +0000 (17:16 +0100)]
Change `print_diff` to output the correct line number.

5 years agoMerge pull request #2997 from matthiaskrgr/cargo_test_release
Nick Cameron [Thu, 6 Sep 2018 05:40:08 +0000 (17:40 +1200)]
Merge pull request #2997 from matthiaskrgr/cargo_test_release

fix cargo test --release

5 years agofix cargo test --release.
Matthias Krüger [Thu, 6 Sep 2018 00:07:09 +0000 (02:07 +0200)]
fix cargo test --release.

test::verify_check_works was failing in relase mode on my machine.

The problem was it would check for target/debug/rustfmt in release mode instead of
target/release/rustfmt and fail an assert.

This commit fixes it so that cargo check looks for target/debug/rustfmt and
cargo check --release looks for target/release/rustfmt

5 years agoMerge pull request #2983 from topecongiro/issue-2642
Nick Cameron [Tue, 4 Sep 2018 07:11:49 +0000 (19:11 +1200)]
Merge pull request #2983 from topecongiro/issue-2642

Handle raw string literals in CharClasses

5 years agoMerge pull request #2993 from topecongiro/rustc-ap
Nick Cameron [Tue, 4 Sep 2018 07:11:23 +0000 (19:11 +1200)]
Merge pull request #2993 from topecongiro/rustc-ap

Cargo update

5 years agoCargo update
topecongiro [Fri, 31 Aug 2018 05:21:02 +0000 (14:21 +0900)]
Cargo update

5 years agoMerge pull request #2992 from max-sixty/clippy2
Nick Cameron [Mon, 3 Sep 2018 01:25:35 +0000 (13:25 +1200)]
Merge pull request #2992 from max-sixty/clippy2

Clippy 2/2

5 years agoMerge pull request #2986 from topecongiro/issue-2907
Nick Cameron [Mon, 3 Sep 2018 01:10:50 +0000 (13:10 +1200)]
Merge pull request #2986 from topecongiro/issue-2907

Handle chain w/ try operators with spaces

5 years agoMerge pull request #2991 from topecongiro/raw-identifier-in-chain
Nick Cameron [Mon, 3 Sep 2018 01:08:19 +0000 (13:08 +1200)]
Merge pull request #2991 from topecongiro/raw-identifier-in-chain

Handle raw identifiers in chain

5 years agofinal clippy changes
Maximilian Roos [Sat, 1 Sep 2018 20:26:47 +0000 (16:26 -0400)]
final clippy changes

5 years agoHandle raw identifiers in chain
Seiichi Uchida [Sat, 1 Sep 2018 07:18:27 +0000 (16:18 +0900)]
Handle raw identifiers in chain

5 years agoMerge pull request #2987 from YaLTeR/fix-issue-2930
Seiichi Uchida [Sat, 1 Sep 2018 07:04:14 +0000 (16:04 +0900)]
Merge pull request #2987 from YaLTeR/fix-issue-2930

Use correct shape in Visual tuple rewriting

5 years agoUse correct fn args indent for Visual
Ivan Molodetskikh [Fri, 31 Aug 2018 13:53:18 +0000 (16:53 +0300)]
Use correct fn args indent for Visual

5 years agoAdd debug logging to fn-related functions
Ivan Molodetskikh [Fri, 31 Aug 2018 13:52:45 +0000 (16:52 +0300)]
Add debug logging to fn-related functions

5 years agoAdd a test for #2922
Ivan Molodetskikh [Fri, 31 Aug 2018 13:01:38 +0000 (16:01 +0300)]
Add a test for #2922

5 years agoFix shape in rewrite_tuple_in_visual_indent_style
Ivan Molodetskikh [Fri, 31 Aug 2018 12:50:41 +0000 (15:50 +0300)]
Fix shape in rewrite_tuple_in_visual_indent_style

5 years agoAdd a test for #2930
Ivan Molodetskikh [Fri, 31 Aug 2018 12:25:08 +0000 (15:25 +0300)]
Add a test for #2930

5 years agoMerge pull request #2984 from mehcode/feature/edition-option
Seiichi Uchida [Fri, 31 Aug 2018 09:26:19 +0000 (18:26 +0900)]
Merge pull request #2984 from mehcode/feature/edition-option

Accept 2015 and 2018 instead of Edition2015 and Edition2018 for edition option

5 years agoUpdate tests
Seiichi Uchida [Fri, 31 Aug 2018 09:19:34 +0000 (18:19 +0900)]
Update tests

5 years agoSimplify post-comment extraction
Seiichi Uchida [Fri, 31 Aug 2018 09:19:13 +0000 (18:19 +0900)]
Simplify post-comment extraction

5 years agoUse trim_tries to extract post comment over simple trim_matches
Seiichi Uchida [Fri, 31 Aug 2018 09:16:50 +0000 (18:16 +0900)]
Use trim_tries to extract post comment over simple trim_matches

5 years agoUse trim_tries to extract pre-comments over simple trim_matches
Seiichi Uchida [Fri, 31 Aug 2018 09:11:59 +0000 (18:11 +0900)]
Use trim_tries to extract pre-comments over simple trim_matches

5 years agoAdd trim_tries
Seiichi Uchida [Fri, 31 Aug 2018 09:11:52 +0000 (18:11 +0900)]
Add trim_tries

5 years agoAdd a test for #2907
Seiichi Uchida [Fri, 31 Aug 2018 09:10:47 +0000 (18:10 +0900)]
Add a test for #2907

5 years agoAccept 2015 and 2018 instead of Edition2015 and Edition2018 for edition option
Ryan Leckey [Fri, 31 Aug 2018 07:04:23 +0000 (00:04 -0700)]
Accept 2015 and 2018 instead of Edition2015 and Edition2018 for edition option

5 years agoMerge branch 'master' into clippy2
Maximilian Roos [Fri, 31 Aug 2018 04:19:12 +0000 (00:19 -0400)]
Merge branch 'master' into clippy2

5 years agoHandle raw string literal without any sharps
topecongiro [Fri, 31 Aug 2018 01:49:39 +0000 (10:49 +0900)]
Handle raw string literal without any sharps

5 years agoHandle raw string literals in CharClasses
topecongiro [Fri, 31 Aug 2018 01:37:46 +0000 (10:37 +0900)]
Handle raw string literals in CharClasses

5 years agoAdd a test for #2642
topecongiro [Fri, 31 Aug 2018 01:37:22 +0000 (10:37 +0900)]
Add a test for #2642

5 years agoMerge pull request #2981 from topecongiro/issue-2956
Nick Cameron [Thu, 30 Aug 2018 22:43:06 +0000 (10:43 +1200)]
Merge pull request #2981 from topecongiro/issue-2956

Keep formatting fn even if there is an unformattable argument

5 years agoKeep formatting fn even if there is an unformattable argument
Seiichi Uchida [Thu, 30 Aug 2018 14:39:39 +0000 (23:39 +0900)]
Keep formatting fn even if there is an unformattable argument

5 years agoAdd a test for #2956
Seiichi Uchida [Thu, 30 Aug 2018 14:38:40 +0000 (23:38 +0900)]
Add a test for #2956

5 years agoMerge pull request #2980 from davidalber/use-stable-in-travis
Nick Cameron [Thu, 30 Aug 2018 08:23:00 +0000 (20:23 +1200)]
Merge pull request #2980 from davidalber/use-stable-in-travis

Use stable Rust in Travis CI config snippet

5 years agoUse stable Rust in Travis CI config snippet
David Alber [Thu, 30 Aug 2018 04:59:12 +0000 (21:59 -0700)]
Use stable Rust in Travis CI config snippet

In #2725 the Travis CI config snippet was changed to use nightly
Rust because the stable rustfmt of the time (rustfmt 0.4.1-stable)
did not contain the `--check` flag, which is used in the Travis
config snippet. The current stable rustfmt (rustfmt 0.8.2-stable)
does contain the `--check` flag, so it is now possible to use the
Travis config in the README with stable rustfmt.

5 years agoMerge pull request #2975 from max-sixty/clippy
Nick Cameron [Thu, 30 Aug 2018 04:43:04 +0000 (16:43 +1200)]
Merge pull request #2975 from max-sixty/clippy

Some clippy changes

5 years agoMerge pull request #2952 from crw5996/fix-use-bug
Nick Cameron [Wed, 29 Aug 2018 23:18:04 +0000 (11:18 +1200)]
Merge pull request #2952 from crw5996/fix-use-bug

Fixed modsep operator for various rustlang editions

5 years agoMerge branch 'master' into clippy2
Maximilian Roos [Wed, 29 Aug 2018 01:57:15 +0000 (21:57 -0400)]
Merge branch 'master' into clippy2

5 years agomore clippy
Maximilian Roos [Wed, 29 Aug 2018 01:57:08 +0000 (21:57 -0400)]
more clippy

5 years agoset of clippy changes
Maximilian Roos [Tue, 28 Aug 2018 04:33:51 +0000 (00:33 -0400)]
set of clippy changes

5 years agoMerge pull request #2974 from max-sixty/readme
Seiichi Uchida [Tue, 28 Aug 2018 04:08:25 +0000 (13:08 +0900)]
Merge pull request #2974 from max-sixty/readme

Remove old readme content

5 years agoFixed overly complicated code as requested in the code review
crw5996 [Tue, 28 Aug 2018 03:08:37 +0000 (23:08 -0400)]
Fixed overly complicated code as requested in the code review

5 years agoMerge branch 'master' of https://github.com/rust-lang-nursery/rustfmt into fix-use-bug
crw5996 [Tue, 28 Aug 2018 03:03:29 +0000 (23:03 -0400)]
Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt into fix-use-bug

5 years agoFixed Issues brought up in PR
crw5996 [Mon, 27 Aug 2018 18:31:43 +0000 (14:31 -0400)]
Fixed Issues brought up in PR

5 years agoremove old readme content
Maximilian Roos [Tue, 28 Aug 2018 02:53:47 +0000 (22:53 -0400)]
remove old readme content

5 years agoMerge pull request #2972 from crw5996/fix-optional-arg-condensing
Nick Cameron [Tue, 28 Aug 2018 02:09:31 +0000 (14:09 +1200)]
Merge pull request #2972 from crw5996/fix-optional-arg-condensing

Fix optional arg condensing

5 years agoRefactored to not use a mutable variable
crw5996 [Mon, 27 Aug 2018 19:29:30 +0000 (15:29 -0400)]
Refactored to not use a mutable variable

5 years agoFixed #2955. Added value to determine whether or not rustfmt has condensed a tuple...
crw5996 [Mon, 27 Aug 2018 16:31:26 +0000 (12:31 -0400)]
Fixed #2955. Added value to determine whether or not rustfmt has condensed a tuple-struct

Refactored to not use a mutable variable