]> git.lizzy.rs Git - rust.git/log
rust.git
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 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 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

5 years agoMerge branch 'master' of https://github.com/rust-lang-nursery/rustfmt into fix-option...
crw5996 [Mon, 27 Aug 2018 16:31:32 +0000 (12:31 -0400)]
Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt into fix-optional-arg-condensing

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

5 years agoMerge pull request #2971 from topecongiro/issue-2969
Nick Cameron [Mon, 27 Aug 2018 11:01:27 +0000 (23:01 +1200)]
Merge pull request #2971 from topecongiro/issue-2969

Use span_ends_with_comma to find a trailing comma in an attribute

5 years agoUse span_ends_with_comma to find a trailing comma in an attribute
Seiichi Uchida [Mon, 27 Aug 2018 07:37:58 +0000 (16:37 +0900)]
Use span_ends_with_comma to find a trailing comma in an attribute

5 years agoAdd a test for #2969
Seiichi Uchida [Mon, 27 Aug 2018 07:12:11 +0000 (16:12 +0900)]
Add a test for #2969

5 years agonightly-0.99.4
Nick Cameron [Sun, 26 Aug 2018 23:19:18 +0000 (11:19 +1200)]
nightly-0.99.4

5 years agoExpect a couple of integration tests to fail
Nick Cameron [Sun, 26 Aug 2018 23:14:23 +0000 (11:14 +1200)]
Expect a couple of integration tests to fail

5 years agoMerge pull request #2942 from crw5996/fix-ellipsis-bug
Nick Cameron [Sun, 26 Aug 2018 21:44:28 +0000 (09:44 +1200)]
Merge pull request #2942 from crw5996/fix-ellipsis-bug

Fix Issue with ellipsis matching in pattern.rs

5 years agoMerge pull request #2966 from topecongiro/issue-2953
Nick Cameron [Sun, 26 Aug 2018 21:39:08 +0000 (09:39 +1200)]
Merge pull request #2966 from topecongiro/issue-2953

Format in-place expression like assignment

5 years agoMerge pull request #2948 from CAD97/patch-2
Nick Cameron [Sun, 26 Aug 2018 21:23:16 +0000 (09:23 +1200)]
Merge pull request #2948 from CAD97/patch-2

Consider "dev" as nightly for feature (un)gating

5 years agoFormat in-place expression like assignment
Seiichi Uchida [Sun, 26 Aug 2018 04:20:25 +0000 (13:20 +0900)]
Format in-place expression like assignment

5 years agoRemove an unnecessary attribute
Seiichi Uchida [Sun, 26 Aug 2018 04:20:07 +0000 (13:20 +0900)]
Remove an unnecessary attribute

5 years agoAdd a test for #2953
Seiichi Uchida [Sun, 26 Aug 2018 04:19:44 +0000 (13:19 +0900)]
Add a test for #2953

5 years agoFix build with rust nightly by updating try block syntax. (#2965)
Zach Lute [Sun, 26 Aug 2018 04:02:24 +0000 (21:02 -0700)]
Fix build with rust nightly by updating try block syntax. (#2965)

5 years agoImpl only use (#2951)
Maximilian Roos [Fri, 24 Aug 2018 05:39:05 +0000 (01:39 -0400)]
Impl only use (#2951)

5 years agoFixed ellipsis bug where rustfmt was creating code that could not be parsed
chris [Tue, 21 Aug 2018 22:38:21 +0000 (18:38 -0400)]
Fixed ellipsis bug where rustfmt was creating code that could not be parsed

5 years agoMerge pull request #2950 from CAD97/master
Nick Cameron [Thu, 23 Aug 2018 23:17:15 +0000 (11:17 +1200)]
Merge pull request #2950 from CAD97/master

Rename CodeMap/FileMap to SourceMap/SourceFile

5 years agoReformat
cad97 [Thu, 23 Aug 2018 21:14:19 +0000 (17:14 -0400)]
Reformat

5 years agoRename CodeMap/FileMap to SourceMap/SourceFile
cad97 [Thu, 23 Aug 2018 21:10:46 +0000 (17:10 -0400)]
Rename CodeMap/FileMap to SourceMap/SourceFile

#2946

5 years ago Consider "dev" as nightly for feature (un)gating
Christopher Durham [Thu, 23 Aug 2018 08:28:44 +0000 (04:28 -0400)]
 Consider "dev" as nightly for feature (un)gating

5 years agoConsider "dev" as nightly for feature (un)gating
Christopher Durham [Thu, 23 Aug 2018 08:24:15 +0000 (04:24 -0400)]
Consider "dev" as nightly for feature (un)gating

Closes #2940

5 years agonightly-0.99.3
Nick Cameron [Thu, 23 Aug 2018 03:34:45 +0000 (15:34 +1200)]
nightly-0.99.3

5 years agoMerge pull request #2925 from scampi/issue539
Nick Cameron [Wed, 22 Aug 2018 22:13:56 +0000 (10:13 +1200)]
Merge pull request #2925 from scampi/issue539

discard trailing blank comments

5 years agoMerge pull request #2935 from topecongiro/rustc-ap-syntax
Nick Cameron [Tue, 21 Aug 2018 08:28:56 +0000 (20:28 +1200)]
Merge pull request #2935 from topecongiro/rustc-ap-syntax

Cargo update

5 years agoMerge pull request #2915 from Xanewok/file-lines-ser-json
Nick Cameron [Tue, 21 Aug 2018 08:26:25 +0000 (20:26 +1200)]
Merge pull request #2915 from Xanewok/file-lines-ser-json

Expose FileLines JSON representation

5 years agoRemove an invalid attribute from a test
Seiichi Uchida [Sat, 18 Aug 2018 15:26:56 +0000 (00:26 +0900)]
Remove an invalid attribute from a test

This has become a parser error.

5 years agoUpdate import path to ThinVec
Seiichi Uchida [Sat, 18 Aug 2018 15:26:34 +0000 (00:26 +0900)]
Update import path to ThinVec

5 years agoCargo update
Seiichi Uchida [Sat, 18 Aug 2018 15:26:11 +0000 (00:26 +0900)]
Cargo update

Update `rustc-ap-*` to 230.0.0.

5 years agoMerge pull request #2920 from topecongiro/issue-2919
Nick Cameron [Fri, 17 Aug 2018 17:07:59 +0000 (10:07 -0700)]
Merge pull request #2920 from topecongiro/issue-2919

Use correct max width when formatting macro body

5 years agofix verbose output
Stéphane Campinas [Thu, 16 Aug 2018 18:00:49 +0000 (20:00 +0200)]
fix verbose output

5 years agodiscard trailing blank comments
Stéphane Campinas [Thu, 16 Aug 2018 17:59:32 +0000 (19:59 +0200)]
discard trailing blank comments

5 years agofix the identification of a block comment.
Stéphane Campinas [Thu, 16 Aug 2018 17:55:15 +0000 (19:55 +0200)]
fix the identification of a block comment.

Block comments like below were not properly supported:

    /*
       something here but it doesn't start with a star
     */

because of the line that didn't start with a star.

5 years agoIncrease the max width by tab width when using format_code_block
Seiichi Uchida [Wed, 15 Aug 2018 22:47:37 +0000 (07:47 +0900)]
Increase the max width by tab width when using format_code_block

since the macro body will be surrounded by fn main block.

5 years agoReduce the max width by the width of indent
Seiichi Uchida [Wed, 15 Aug 2018 22:46:59 +0000 (07:46 +0900)]
Reduce the max width by the width of indent

5 years agoAdd a test for #2919
Seiichi Uchida [Wed, 15 Aug 2018 22:09:52 +0000 (07:09 +0900)]
Add a test for #2919

5 years agoRun `cargo fmt`
Igor Matuszewski [Tue, 14 Aug 2018 21:23:00 +0000 (23:23 +0200)]
Run `cargo fmt`

5 years agoMake file_lines_to_json test deterministic
Igor Matuszewski [Tue, 14 Aug 2018 21:22:09 +0000 (23:22 +0200)]
Make file_lines_to_json test deterministic

5 years agoExpose FileLines JSON representation
Igor Matuszewski [Tue, 14 Aug 2018 11:33:58 +0000 (13:33 +0200)]
Expose FileLines JSON representation

5 years agoMerge pull request #2912 from topecongiro/fix-slice-pattern
Nick Cameron [Mon, 13 Aug 2018 00:49:54 +0000 (12:49 +1200)]
Merge pull request #2912 from topecongiro/fix-slice-pattern

Do not show wildcard pattern in slice pattern

5 years agoRemove a wildcard parttern from slice patterns
Seiichi Uchida [Sun, 12 Aug 2018 14:56:09 +0000 (23:56 +0900)]
Remove a wildcard parttern from slice patterns

5 years agoAdd a test for slice patterns
Seiichi Uchida [Sun, 12 Aug 2018 14:55:34 +0000 (23:55 +0900)]
Add a test for slice patterns

5 years agoMerge pull request #2910 from OddBloke/patch-1
Seiichi Uchida [Sat, 11 Aug 2018 03:27:29 +0000 (12:27 +0900)]
Merge pull request #2910 from OddBloke/patch-1

Correct the ordering of the config help option

5 years agoCorrect the ordering of the config help option
Daniel Watkins [Sat, 11 Aug 2018 00:05:54 +0000 (20:05 -0400)]
Correct the ordering of the config help option

5 years agoMerge pull request #2902 from topecongiro/update-readme
Nick Cameron [Tue, 7 Aug 2018 07:09:15 +0000 (19:09 +1200)]
Merge pull request #2902 from topecongiro/update-readme

Update readme

5 years agoReplace '--conifig-help' with '--config=help'
Seiichi Uchida [Tue, 7 Aug 2018 04:00:30 +0000 (13:00 +0900)]
Replace '--conifig-help' with '--config=help'

5 years agoRemove outdated paragraphs
Seiichi Uchida [Tue, 7 Aug 2018 03:58:49 +0000 (12:58 +0900)]
Remove outdated paragraphs

5 years agoMerge pull request #2899 from topecongiro/chain-with-comments
Nick Cameron [Tue, 7 Aug 2018 03:07:23 +0000 (15:07 +1200)]
Merge pull request #2899 from topecongiro/chain-with-comments

Format chains with comment

5 years agoMerge pull request #2901 from topecongiro/issue-2760
Nick Cameron [Tue, 7 Aug 2018 02:53:26 +0000 (14:53 +1200)]
Merge pull request #2901 from topecongiro/issue-2760

Use custom path value if one exists when searching modules

5 years agoUpdate rustc-ap-syntax
Nick Cameron [Mon, 6 Aug 2018 23:30:44 +0000 (11:30 +1200)]
Update rustc-ap-syntax

5 years agoAdd comment
Seiichi Uchida [Mon, 6 Aug 2018 13:34:58 +0000 (22:34 +0900)]
Add comment

5 years agoUse custom path value if one exists when searching modules
Seiichi Uchida [Mon, 6 Aug 2018 13:28:05 +0000 (22:28 +0900)]
Use custom path value if one exists when searching modules

5 years agoMerge pull request #2900 from topecongiro/combine-attrs
Nick Cameron [Mon, 6 Aug 2018 07:37:05 +0000 (19:37 +1200)]
Merge pull request #2900 from topecongiro/combine-attrs

Combine function-like attributes

5 years agoMerge pull request #2897 from topecongiro/issue-2896
Nick Cameron [Mon, 6 Aug 2018 07:36:03 +0000 (19:36 +1200)]
Merge pull request #2897 from topecongiro/issue-2896

Ignore comment in wrap_str

5 years agoMerge pull request #2892 from topecongiro/issue-2884
Nick Cameron [Mon, 6 Aug 2018 07:34:44 +0000 (19:34 +1200)]
Merge pull request #2892 from topecongiro/issue-2884

Explicitly handle semicolon after the item in statement position

5 years agoMerge pull request #2890 from topecongiro/use-builder-pattern-for-ListFormatting
Nick Cameron [Mon, 6 Aug 2018 07:34:08 +0000 (19:34 +1200)]
Merge pull request #2890 from topecongiro/use-builder-pattern-for-ListFormatting

Use builder pattern for ListFormatting