]>
git.lizzy.rs Git - rust.git/log
Nick Cameron [Mon, 16 Jan 2017 23:01:10 +0000 (12:01 +1300)]
Fix bug in identifying comments
Fixes 1233
Nick Cameron [Mon, 16 Jan 2017 04:58:51 +0000 (17:58 +1300)]
Add a more lightweight method for rewriting comments when we are not normalising
Fixes #652
Nick Cameron [Mon, 16 Jan 2017 03:37:58 +0000 (16:37 +1300)]
Allow empty blocks on one line in more places
In particular if they contain only a single-line comment.
Fixes #493
Nick Cameron [Mon, 16 Jan 2017 01:50:27 +0000 (14:50 +1300)]
make rustfmt-normalize_comments false by default
Nick Cameron [Wed, 11 Jan 2017 01:34:42 +0000 (14:34 +1300)]
Refactor if/else formatting
Removes else_if_brace_style from config options. Use control_brace_style instead.
Nick Cameron [Tue, 10 Jan 2017 23:06:23 +0000 (12:06 +1300)]
Refactor pairs/binops
sinkuu [Mon, 9 Jan 2017 03:11:12 +0000 (12:11 +0900)]
Fix #1258 (#1266)
* Fix #1258
* Add test
Stepan Koltsov [Mon, 9 Jan 2017 02:58:06 +0000 (06:58 +0400)]
Do not ignore space_before_bound in where clause (#1267)
Stepan Koltsov [Mon, 9 Jan 2017 02:57:11 +0000 (06:57 +0400)]
Better message for LineOverflow error (#1268)
(with current length and configured limit)
Nick Cameron [Fri, 6 Jan 2017 04:02:56 +0000 (17:02 +1300)]
Remove `self` from `use foo::bar::self;`
Also adds the `normalize_imports` config option.
Fixes #1252
Nick Cameron [Fri, 6 Jan 2017 03:35:28 +0000 (16:35 +1300)]
If a string goes over-width, give up formatting it
Logic here is that the original might be better and at best we'll only make it a different kind of bad.
Fixes #1237
Nick Cameron [Fri, 6 Jan 2017 03:06:09 +0000 (16:06 +1300)]
Macros in types are possible
Fixes #1234
sinkuu [Tue, 3 Jan 2017 20:20:02 +0000 (05:20 +0900)]
Fix #1259 (#1263)
* Use `Indent::block_indent` instead of adding `config.tab_spaces`
* Fix #1259 impl block closing brace placement
Nick Cameron [Fri, 23 Dec 2016 21:48:46 +0000 (10:48 +1300)]
Merge pull request #1251 from erickt/master
Version bump for dependencies, add support for `break` values
Erick Tryzelaar [Fri, 23 Dec 2016 19:26:23 +0000 (11:26 -0800)]
Version bump for toml, unicode-segmentation, itertools, and walkdir
Erick Tryzelaar [Fri, 23 Dec 2016 19:13:00 +0000 (11:13 -0800)]
Update to the latest syntex module
One notable feature is this this adds support for the experimental
`let x = loop { ... break $expr; }` syntax. This also includes a
test for formatting all the break and continue variations.
Antoine Gersant [Wed, 21 Dec 2016 06:32:04 +0000 (07:32 +0100)]
Fixed broken link to style guidelines (#1245)
Jason Dusek [Fri, 16 Dec 2016 18:56:15 +0000 (10:56 -0800)]
Recognize "rlib" and "cdylib" crates (#1238)
Addresses #828 and https://github.com/lunaryorn/emacs-module.rs/issues/4 and probably numerous others.
Luke Clifton [Mon, 28 Nov 2016 00:47:38 +0000 (08:47 +0800)]
Don't drop opening brace on long line matches. (#1228)
* Don't drop opening brace on long line matches.
Fixes #1225
* Added a test case for long match arms with braces on newline.
Luke Clifton [Mon, 28 Nov 2016 00:47:07 +0000 (08:47 +0800)]
Indent open brace for impl when nested. (#1227)
* Indent open brace for impl when nested.
Fixes #1226
* Added test case for indented impl with brace on newline
Nick Cameron [Sun, 27 Nov 2016 20:52:27 +0000 (09:52 +1300)]
Merge pull request #1231 from mineo/condense_wildcard_suffices
Prevent an ugly linebreak in --config-helps description of condense_wildcard_suffices
Wieland Hoffmann [Sun, 27 Nov 2016 20:43:02 +0000 (21:43 +0100)]
Prevent an ugly linebreak in --config-helps description of condense_wildcard_suffices
Nick Cameron [Sun, 20 Nov 2016 19:37:35 +0000 (08:37 +1300)]
update Serde, etc.
Lots of changes to how closures work
Nick Cameron [Sat, 19 Nov 2016 21:37:34 +0000 (10:37 +1300)]
v0.6.3
Bekh-Ivanov Aleksey [Mon, 14 Nov 2016 04:42:15 +0000 (07:42 +0300)]
Stripping trailing commas and spaces from `vec!` elements (#1219)
* Stripping trailing commas and spaces from `vec!` elements
* Stripping trailing commas and spaces ONLY from `vec!` elements
* Added comment
Nick Cameron [Sun, 13 Nov 2016 20:46:47 +0000 (09:46 +1300)]
Merge pull request #1221 from Zarokka/issue-1216
fix #1216: panic on comment starting with //*
Nick Cameron [Sun, 13 Nov 2016 20:33:42 +0000 (09:33 +1300)]
Merge pull request #1218 from dereckson/patch-1
Improve config::WriteMode comments
Martin Wohli [Sun, 13 Nov 2016 08:36:43 +0000 (09:36 +0100)]
fix #1216: panic on comment starting with //*
Sébastien Santoro [Fri, 11 Nov 2016 04:27:18 +0000 (05:27 +0100)]
Improve config::WriteMode comments
- Fix typo
- Switch comments verbs to the the 3rd person to offer a better coherence among options
Nick Cameron [Mon, 7 Nov 2016 20:58:10 +0000 (09:58 +1300)]
Merge pull request #1212 from marcusklaas/test123
Condense suffix strings of simple wildcards in patterns
Marcus Klaas [Mon, 7 Nov 2016 20:38:20 +0000 (21:38 +0100)]
Condense suffix strings of simple wildcards in patterns
Nick Cameron [Sun, 6 Nov 2016 22:32:03 +0000 (11:32 +1300)]
Merge pull request #1207 from Fraser999/master
Fixes #1184 where reordering import items could cause a panic.
Nick Cameron [Sun, 6 Nov 2016 22:06:16 +0000 (11:06 +1300)]
Merge pull request #1206 from masonium/fmt-extra-files
#1126 cargo-fmt processes bench, test, example files
Fraser Hutchison [Thu, 3 Nov 2016 04:22:16 +0000 (04:22 +0000)]
Fixes a few doc typos.
Fraser Hutchison [Thu, 3 Nov 2016 04:21:47 +0000 (04:21 +0000)]
Fixes #1184 where reordering import items could cause a panic.
Also extends an existing test to avoid regression.
Mason Smith [Wed, 2 Nov 2016 09:28:06 +0000 (02:28 -0700)]
cargo-fmt processes bench, test, example files
Nick Cameron [Thu, 27 Oct 2016 20:14:37 +0000 (09:14 +1300)]
Merge pull request #1200 from efyang/strayspace
Remove extra whitespace after macro calls
Edward Yang [Thu, 27 Oct 2016 07:40:08 +0000 (02:40 -0500)]
Remove extra whitespace after macro calls
Edward Yang [Mon, 24 Oct 2016 19:45:15 +0000 (14:45 -0500)]
Stop extra newlines from being added after block comments (#1185)
Mikko Rantanen [Mon, 17 Oct 2016 20:09:49 +0000 (23:09 +0300)]
Add spaces_within_square_brackets config option. (#1191)
* Add spaces_within_square_brackets config option.
Enabling the config enforces spaces within various array/slice brackets.
* Fixed budget-calculations for [] spacing
Nick Cameron [Thu, 13 Oct 2016 22:38:39 +0000 (11:38 +1300)]
Merge pull request #1188 from Rantanen/master
Add support for spaces_within_angle_brackets
Nick Cameron [Thu, 13 Oct 2016 21:10:18 +0000 (10:10 +1300)]
Merge pull request #1189 from Pursuit92/master
Quick fix for "impl Trait"
Josh Chase [Thu, 13 Oct 2016 19:15:06 +0000 (12:15 -0700)]
Quick fix for "impl Trait"
* Remove "TODO" conversion
* Add a couple of simple test cases
Fix courtesy of @signaraiona
Mikko Rantanen [Thu, 13 Oct 2016 19:28:19 +0000 (22:28 +0300)]
Added test for `for< 'a >`
Mikko Rantanen [Thu, 13 Oct 2016 15:48:22 +0000 (18:48 +0300)]
Add support for spaces_within_angle_brackets
Enabling the config adds spaces within type arguments: <>
Mikko Rantanen [Thu, 13 Oct 2016 01:34:08 +0000 (04:34 +0300)]
Add support for spaces_within_parens config (#1187)
* Add support for spaces_within_parens config
* Changes based on review comments
Nick Cameron [Wed, 12 Oct 2016 04:48:20 +0000 (17:48 +1300)]
Merge pull request #1182 from philipc/issue-1149
Preserve macro formatting if we can't rewrite it
Nick Cameron [Tue, 11 Oct 2016 01:46:37 +0000 (14:46 +1300)]
Merge pull request #1186 from woshilapin/vim-doc
Update link towards vim documentation
Jean SIMARD [Tue, 11 Oct 2016 01:35:07 +0000 (21:35 -0400)]
Update link towards vim documentation
Nick Cameron [Thu, 6 Oct 2016 23:58:18 +0000 (12:58 +1300)]
cargo update
Nick Cameron [Wed, 5 Oct 2016 18:17:00 +0000 (07:17 +1300)]
Merge pull request #1183 from oylenshpeegul/patch-1
Link to rust-mode.el instead of rustfmt.el
Tim Heaney [Wed, 5 Oct 2016 13:19:21 +0000 (09:19 -0400)]
Link to rust-mode.el instead of rustfmt.el
Link directly to rust-mode.el, since rustfmt.el is marked obsolete.
Philip Craig [Mon, 3 Oct 2016 04:11:49 +0000 (14:11 +1000)]
Preserve macro formatting if we can't rewrite it
Florian Gilcher [Thu, 29 Sep 2016 19:34:46 +0000 (21:34 +0200)]
Add custom comments (#1179)
* Add custom comments
This allows users to use custom comments such as
```
//@ this is a custom comment
//@ with multiple lines
```
without having them destroyed by rustfmt.
* Fix issues with empty lines
* Check non-whitespace right after custom comments
Nick Cameron [Tue, 27 Sep 2016 17:52:17 +0000 (06:52 +1300)]
Merge pull request #1175 from nokaa/master
Fix broken import
nokaa [Tue, 27 Sep 2016 17:38:17 +0000 (12:38 -0500)]
Fix broken import
Nick Cameron [Tue, 27 Sep 2016 04:24:58 +0000 (17:24 +1300)]
Write to the supplied buffer if one is supplied to format_input
Nick Cameron [Tue, 20 Sep 2016 05:55:25 +0000 (17:55 +1200)]
Merge pull request #1166 from sinkuu/fix_775
Fix #775: Off-by-one overrun in deeply nested function call
sinkuu [Tue, 20 Sep 2016 05:01:35 +0000 (14:01 +0900)]
Fix #775
rewrite_tuple referring config.max_width where given width should be
used
Nick Cameron [Mon, 19 Sep 2016 06:51:21 +0000 (18:51 +1200)]
Merge pull request #1156 from sinkuu/break_if_let
Prefer line break at `=`/`in`
Nick Cameron [Mon, 19 Sep 2016 03:17:47 +0000 (15:17 +1200)]
Merge pull request #1165 from sinkuu/fix_self_tests
Fix self test
sinkuu [Mon, 19 Sep 2016 02:48:56 +0000 (11:48 +0900)]
Fix self test
Nick Cameron [Mon, 19 Sep 2016 02:35:42 +0000 (14:35 +1200)]
Merge pull request #1162 from sinkuu/fix1040
Fix #1040
Nick Cameron [Sun, 18 Sep 2016 20:49:38 +0000 (08:49 +1200)]
Merge pull request #1161 from sinkuu/fix550
Fix #550: `if` nested in tuple is indented oddly
Nick Cameron [Sat, 17 Sep 2016 23:36:08 +0000 (11:36 +1200)]
Merge pull request #1160 from est31/master
Two improvements
sinkuu [Fri, 9 Sep 2016 14:20:16 +0000 (23:20 +0900)]
Prevent line breaking at `=` or `in` after trivial patterns
sinkuu [Sat, 10 Sep 2016 05:02:05 +0000 (14:02 +0900)]
Fix #550: `if` nested in tuple is indented oddly
est31 [Sat, 17 Sep 2016 01:20:00 +0000 (03:20 +0200)]
Improve comment rewriting with normalize_comments == false
Only change multiline comments of the form
```rust
/*
* Text
*/
```
while not affecting comments of the form
```rust
/*
Text
*/
```
when normalize_comments is off. In the first case,
we have a known character we can align against, while
we don't have one in the second case.
Before, we have converted the second form into the first,
but this is against the spirit of normalize_comments being
turned off.
Fixes #956
est31 [Fri, 16 Sep 2016 23:44:51 +0000 (01:44 +0200)]
Add three new options for spaces
Nick Cameron [Fri, 16 Sep 2016 03:19:18 +0000 (15:19 +1200)]
Update to latest Syntex
+ Cargo update
+ 0.6.2 release
Nick Cameron [Tue, 13 Sep 2016 22:32:03 +0000 (15:32 -0700)]
Merge pull request #1151 from sinkuu/issue1021
Fix #1021: Handle `..` in tuple / tuple struct patterns
sinkuu [Sat, 10 Sep 2016 04:08:32 +0000 (13:08 +0900)]
Fix #1040
sinkuu [Tue, 6 Sep 2016 09:03:47 +0000 (18:03 +0900)]
Fix #1021: Handle `..` in tuple / tuple struct patterns
dawirstejeck [Tue, 6 Sep 2016 05:11:56 +0000 (07:11 +0200)]
Split impl at 'for' if a line break is needed (#1148)
* Split impl at 'for' if a line break is needed
* Fix formatting
* Improve comments
* Skip second try if there is no 'for'
* Restore intentional trailing whitespace
* Change test source to be incorrectly formatted
* Restore more missing trailing whitespace
* Remove too much whitespace...
Really should learn how to use git revert.
Nick Cameron [Mon, 5 Sep 2016 04:05:58 +0000 (16:05 +1200)]
Merge pull request #1147 from brettcannon/patch-1
Put rustfmt on PATH so `cargo fmt` works on Travis
Brett Cannon [Sun, 4 Sep 2016 00:30:02 +0000 (17:30 -0700)]
Put rustfmt on PATH so `cargo fmt` works on Travis
Closes #1143
Nick Cameron [Mon, 29 Aug 2016 03:01:48 +0000 (15:01 +1200)]
Merge pull request #1135 from sinkuu/clippy
Run clippy
sinkuu [Tue, 23 Aug 2016 14:14:45 +0000 (23:14 +0900)]
Run clippy
Nick Cameron [Sun, 28 Aug 2016 19:07:48 +0000 (07:07 +1200)]
Merge pull request #1134 from sinkuu/issue977
Fix #977
sinkuu [Tue, 23 Aug 2016 12:00:43 +0000 (21:00 +0900)]
Fix #977
Nick Cameron [Sun, 28 Aug 2016 05:48:31 +0000 (17:48 +1200)]
Merge pull request #1142 from kamalmarhubi/fix-1140
Check term supports colour before printing fancy diffs
Kamal Marhubi [Fri, 26 Aug 2016 21:08:47 +0000 (17:08 -0400)]
Check term supports colour before printing fancy diffs
For a terminal like DUMB, we were still attempting to print colourful
diffs, which failed with a `NotSupported` error.
Fixes #1140
Nick Cameron [Thu, 25 Aug 2016 05:30:03 +0000 (17:30 +1200)]
Merge pull request #1138 from johannhof/travis-docs
Add instructions on how to run rustfmt on Travis
Johann Hofmann [Wed, 24 Aug 2016 19:25:31 +0000 (21:25 +0200)]
Add instructions on how to run rustfmt on Travis
This adds very simplistic instructions on how to run rustfmt on CI.
I also wrote a blog post for more details: http://johannh.me/blog/rustfmt-ci.html
Stuart Dootson [Wed, 24 Aug 2016 20:32:04 +0000 (21:32 +0100)]
Fix issue 1124 - detect start of output rather than start of input file when writing output source file (#1133)
* Change required to prevent a trailing space at the end of a separate module being propagated
* Detect the start of the output file rather than the start of the input file when deciding whether to output preceding snippets - this stops unnecessary whitespace and blank lines from being inserted when spans and statements are output in an order other than that from the input file.
* Add code to prevent space from being added with the prefix snippet if a) the snippet is entirely horizontal whitespace, or b) the snippet contains whitespace followed by a newline. This prevents trailing spaces at the end of a line from being added.
* Tests for this issue
* Tidy up `match` statements
* Add test with blank lines between `use` statements
Nick Cameron [Wed, 10 Aug 2016 21:53:58 +0000 (09:53 +1200)]
v0.6.0
Nick Cameron [Wed, 10 Aug 2016 09:52:46 +0000 (21:52 +1200)]
Merge pull request #1123 from juicejitsu/807
Don't emit filename in diff mode, add filename to diff metadata
Stuart Dootson [Wed, 10 Aug 2016 06:13:27 +0000 (08:13 +0200)]
Fix #1120 - rework how the use list prefix is determined. (#1121)
* Fix #1120 - rework how the use list prefix is determined.
* Added test commentary & another test case
Nick Cameron [Wed, 10 Aug 2016 06:12:16 +0000 (18:12 +1200)]
Merge pull request #1122 from studoot/add-test-for-1111
Add test case for issue #1111
juicejitsu [Wed, 10 Aug 2016 01:21:04 +0000 (18:21 -0700)]
Don't emit filename in diff mode, add filename to diff metadata
Stuart Dootson [Tue, 9 Aug 2016 20:11:27 +0000 (22:11 +0200)]
Add commentary
Stuart Dootson [Tue, 9 Aug 2016 20:10:48 +0000 (22:10 +0200)]
Reformat the source to actually pass the tests!
Stuart Dootson [Mon, 8 Aug 2016 21:13:45 +0000 (23:13 +0200)]
Add test case for issue #1111, by adding another route by which a test file's config can be located
Nick Cameron [Fri, 5 Aug 2016 06:03:34 +0000 (18:03 +1200)]
Merge pull request #1119 from HighCommander4/issue1109b
Apply space_before_type_annotation to struct ctors (#1109)
Nathan Ridge [Thu, 4 Aug 2016 04:17:47 +0000 (00:17 -0400)]
Apply space_before_type_annotation to struct ctors (#1109)
Nick Cameron [Fri, 5 Aug 2016 04:29:41 +0000 (16:29 +1200)]
Merge pull request #1117 from pepyakin/issue-1116
Fix underflow in format_imports
Sergey Pepyakin [Tue, 2 Aug 2016 22:25:54 +0000 (01:25 +0300)]
Fix issue-1116
Nick Cameron [Wed, 3 Aug 2016 22:58:32 +0000 (10:58 +1200)]
Merge pull request #1110 from HighCommander4/issue1109a
Add two new whitespace options (#1109)
Nick Cameron [Wed, 3 Aug 2016 22:11:24 +0000 (10:11 +1200)]
Merge pull request #1118 from julienXX/change-multirust-to-rustup-in-readme
Update README with Rustup.rs instead of multirust
Julien Blanchard [Wed, 3 Aug 2016 09:49:09 +0000 (11:49 +0200)]
Update README with Rustup.rs instead of multirust