]>
git.lizzy.rs Git - rust.git/log
Seiichi Uchida [Wed, 19 Sep 2018 14:20:43 +0000 (23:20 +0900)]
Combine chain items only when the item will get orphaned
Seiichi Uchida [Wed, 19 Sep 2018 14:19:24 +0000 (23:19 +0900)]
Update tests
Seiichi Uchida [Wed, 19 Sep 2018 13:33:10 +0000 (22:33 +0900)]
Format generics on associated types
Seiichi Uchida [Wed, 19 Sep 2018 13:20:42 +0000 (22:20 +0900)]
Add a test for #3006
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.
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
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
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
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"
Nathan Sutton [Tue, 18 Sep 2018 11:20:07 +0000 (06:20 -0500)]
Improve error message when failing cargo metadata (#3024)
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.
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)
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
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.
Boyu Yang [Thu, 13 Sep 2018 02:01:34 +0000 (10:01 +0800)]
Fix typo in README.md.
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.
Rémy Rakic [Thu, 13 Sep 2018 00:27:09 +0000 (02:27 +0200)]
add tests interleaving doc attrib comments and regular comments
Rémy Rakic [Wed, 12 Sep 2018 23:13:07 +0000 (01:13 +0200)]
address review comment in Attribute rewrite fn
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
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
Rémy Rakic [Wed, 12 Sep 2018 23:02:11 +0000 (01:02 +0200)]
add test with multiple levels of indents
Rémy Rakic [Wed, 12 Sep 2018 22:37:31 +0000 (00:37 +0200)]
move config attribute
Matthias Krüger [Wed, 12 Sep 2018 19:43:31 +0000 (21:43 +0200)]
cargo fmt: fix typo in format_crate(): (verison -> version)
Stéphane Campinas [Wed, 12 Sep 2018 11:09:07 +0000 (13:09 +0200)]
implement Drop from FmtVisitor in order to simplify failures passing
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
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.
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
Nick Cameron [Wed, 12 Sep 2018 01:55:06 +0000 (13:55 +1200)]
Merge pull request #3011 from topecongiro/rustc-ap-syntax
Cargo update
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"
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
Ivan Molodetskikh [Tue, 11 Sep 2018 09:34:21 +0000 (12:34 +0300)]
Add a visual fn type alias test
Pascal Seitz [Tue, 11 Sep 2018 08:46:39 +0000 (10:46 +0200)]
fixes #2914 by handling BadIssue case
Ivan Molodetskikh [Tue, 11 Sep 2018 08:08:28 +0000 (11:08 +0300)]
Fix last chain item shape for Visual indent_style
Ivan Molodetskikh [Tue, 11 Sep 2018 08:09:17 +0000 (11:09 +0300)]
Add a test for #2985
Ivan Molodetskikh [Tue, 11 Sep 2018 05:41:16 +0000 (08:41 +0300)]
Use correct heuristic for match block flattening
Ivan Molodetskikh [Tue, 11 Sep 2018 05:31:35 +0000 (08:31 +0300)]
Add a test for match flattening
Ivan Molodetskikh [Fri, 31 Aug 2018 14:51:36 +0000 (17:51 +0300)]
Add a test for #2496
Seiichi Uchida [Tue, 11 Sep 2018 04:52:46 +0000 (13:52 +0900)]
Cargo update
Seiichi Uchida [Tue, 11 Sep 2018 04:31:37 +0000 (13:31 +0900)]
Refactor the corner case of handling long function
Seiichi Uchida [Tue, 11 Sep 2018 04:30:36 +0000 (13:30 +0900)]
Add a test for #3009
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
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
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/
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.
Stéphane Campinas [Fri, 7 Sep 2018 12:48:52 +0000 (14:48 +0200)]
propagate errors about failing to rewrite a macro
David Hotham [Fri, 7 Sep 2018 08:01:44 +0000 (09:01 +0100)]
Fix typo in usage text
Robert Bartlensky [Thu, 6 Sep 2018 16:16:48 +0000 (17:16 +0100)]
Change `print_diff` to output the correct line number.
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
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
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
Nick Cameron [Tue, 4 Sep 2018 07:11:23 +0000 (19:11 +1200)]
Merge pull request #2993 from topecongiro/rustc-ap
Cargo update
topecongiro [Fri, 31 Aug 2018 05:21:02 +0000 (14:21 +0900)]
Cargo update
Nick Cameron [Mon, 3 Sep 2018 01:25:35 +0000 (13:25 +1200)]
Merge pull request #2992 from max-sixty/clippy2
Clippy 2/2
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
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
Maximilian Roos [Sat, 1 Sep 2018 20:26:47 +0000 (16:26 -0400)]
final clippy changes
Seiichi Uchida [Sat, 1 Sep 2018 07:18:27 +0000 (16:18 +0900)]
Handle raw identifiers in chain
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
Ivan Molodetskikh [Fri, 31 Aug 2018 13:53:18 +0000 (16:53 +0300)]
Use correct fn args indent for Visual
Ivan Molodetskikh [Fri, 31 Aug 2018 13:52:45 +0000 (16:52 +0300)]
Add debug logging to fn-related functions
Ivan Molodetskikh [Fri, 31 Aug 2018 13:01:38 +0000 (16:01 +0300)]
Add a test for #2922
Ivan Molodetskikh [Fri, 31 Aug 2018 12:50:41 +0000 (15:50 +0300)]
Fix shape in rewrite_tuple_in_visual_indent_style
Ivan Molodetskikh [Fri, 31 Aug 2018 12:25:08 +0000 (15:25 +0300)]
Add a test for #2930
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
Seiichi Uchida [Fri, 31 Aug 2018 09:19:34 +0000 (18:19 +0900)]
Update tests
Seiichi Uchida [Fri, 31 Aug 2018 09:19:13 +0000 (18:19 +0900)]
Simplify post-comment extraction
Seiichi Uchida [Fri, 31 Aug 2018 09:16:50 +0000 (18:16 +0900)]
Use trim_tries to extract post comment 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
Seiichi Uchida [Fri, 31 Aug 2018 09:11:52 +0000 (18:11 +0900)]
Add trim_tries
Seiichi Uchida [Fri, 31 Aug 2018 09:10:47 +0000 (18:10 +0900)]
Add a test for #2907
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
Maximilian Roos [Fri, 31 Aug 2018 04:19:12 +0000 (00:19 -0400)]
Merge branch 'master' into clippy2
topecongiro [Fri, 31 Aug 2018 01:49:39 +0000 (10:49 +0900)]
Handle raw string literal without any sharps
topecongiro [Fri, 31 Aug 2018 01:37:46 +0000 (10:37 +0900)]
Handle raw string literals in CharClasses
topecongiro [Fri, 31 Aug 2018 01:37:22 +0000 (10:37 +0900)]
Add a test for #2642
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
Seiichi Uchida [Thu, 30 Aug 2018 14:39:39 +0000 (23:39 +0900)]
Keep formatting fn even if there is an unformattable argument
Seiichi Uchida [Thu, 30 Aug 2018 14:38:40 +0000 (23:38 +0900)]
Add a test for #2956
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
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.
Nick Cameron [Thu, 30 Aug 2018 04:43:04 +0000 (16:43 +1200)]
Merge pull request #2975 from max-sixty/clippy
Some clippy changes
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
Maximilian Roos [Wed, 29 Aug 2018 01:57:15 +0000 (21:57 -0400)]
Merge branch 'master' into clippy2
Maximilian Roos [Wed, 29 Aug 2018 01:57:08 +0000 (21:57 -0400)]
more clippy
Maximilian Roos [Tue, 28 Aug 2018 04:33:51 +0000 (00:33 -0400)]
set of clippy changes
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
crw5996 [Tue, 28 Aug 2018 03:08:37 +0000 (23:08 -0400)]
Fixed overly complicated code as requested in the code review
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
crw5996 [Mon, 27 Aug 2018 18:31:43 +0000 (14:31 -0400)]
Fixed Issues brought up in PR
Maximilian Roos [Tue, 28 Aug 2018 02:53:47 +0000 (22:53 -0400)]
remove old readme content
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
crw5996 [Mon, 27 Aug 2018 19:29:30 +0000 (15:29 -0400)]
Refactored to not use a mutable variable
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
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
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
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
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
Seiichi Uchida [Mon, 27 Aug 2018 07:12:11 +0000 (16:12 +0900)]
Add a test for #2969
Nick Cameron [Sun, 26 Aug 2018 23:19:18 +0000 (11:19 +1200)]
nightly-0.99.4
Nick Cameron [Sun, 26 Aug 2018 23:14:23 +0000 (11:14 +1200)]
Expect a couple of integration tests to fail