]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agochange new line point in the case of no args
rchaser53 [Fri, 25 Jan 2019 14:40:12 +0000 (23:40 +0900)]
change new line point in the case of no args

5 years agoMerge pull request #3284 from scampi/issue-3270
Nick Cameron [Thu, 17 Jan 2019 07:22:36 +0000 (20:22 +1300)]
Merge pull request #3284 from scampi/issue-3270

recognize strings inside comments in order to avoid indenting them

5 years agoversion-gate the formatting of commented strings
Stéphane Campinas [Wed, 16 Jan 2019 22:06:28 +0000 (23:06 +0100)]
version-gate the formatting of commented strings

5 years agoUse Unicode-standard char width to wrap comments or strings. (#3275)
wada314 [Mon, 14 Jan 2019 23:41:09 +0000 (08:41 +0900)]
Use Unicode-standard char width to wrap comments or strings. (#3275)

5 years agoMerge pull request #3225 from scampi/issue-3224
Stéphane Campinas [Mon, 14 Jan 2019 13:41:00 +0000 (14:41 +0100)]
Merge pull request #3225 from scampi/issue-3224

rewrite_comment: fix block fallback when failing to rewrite an itemized block

5 years agoMerge pull request #3285 from arnavb/patch-1
Stéphane Campinas [Thu, 10 Jan 2019 20:10:34 +0000 (21:10 +0100)]
Merge pull request #3285 from arnavb/patch-1

Fix incorrect documentation for `unstable_features`

5 years agorecognize strings inside comments in order to avoid indenting them
Stéphane Campinas [Thu, 10 Jan 2019 13:25:07 +0000 (14:25 +0100)]
recognize strings inside comments in order to avoid indenting them

Close #3270

5 years agoFix incorrect documentation for `unstable_features`
Arnav Borborah [Thu, 10 Jan 2019 19:54:06 +0000 (14:54 -0500)]
Fix incorrect documentation for `unstable_features`

5 years agoMerge pull request #3260 from topecongiro/issue-3004
Nick Cameron [Mon, 7 Jan 2019 04:39:05 +0000 (17:39 +1300)]
Merge pull request #3260 from topecongiro/issue-3004

Do not modify original source code inside macro call

5 years agoMerge pull request #3276 from dten/allow-p
Nick Cameron [Mon, 7 Jan 2019 04:28:13 +0000 (17:28 +1300)]
Merge pull request #3276 from dten/allow-p

allow specifying package with -p

5 years agoallow specifying package with -p
David Hewson [Tue, 1 Jan 2019 17:49:55 +0000 (17:49 +0000)]
allow specifying package with -p

currently `cargo fmt -p blah` is rejected but `cargo fmt --package blah` is allowed. both should be allowed

5 years agosimplify function to create a string from the itemized block
Stéphane Campinas [Tue, 25 Dec 2018 22:15:52 +0000 (23:15 +0100)]
simplify function to create a string from the itemized block

5 years agoFix shape when formatting return or break expr on statement position (#3259)
Seiichi Uchida [Tue, 25 Dec 2018 09:20:29 +0000 (18:20 +0900)]
Fix shape when formatting return or break expr on statement position (#3259)

5 years agoFix issue #3263 (#3264)
wada314 [Tue, 25 Dec 2018 09:03:48 +0000 (18:03 +0900)]
Fix issue #3263 (#3264)

5 years agoMerge pull request #3266 from wada314/fix-2973
Seiichi Uchida [Tue, 25 Dec 2018 09:00:45 +0000 (18:00 +0900)]
Merge pull request #3266 from wada314/fix-2973

Fix issue #3265

5 years agoMerge pull request #3269 from wada314/lc-unreachable
Seiichi Uchida [Tue, 25 Dec 2018 08:58:27 +0000 (17:58 +0900)]
Merge pull request #3269 from wada314/lc-unreachable

Remove a trivial redundant code.

5 years agoRemove a trivial redundant code.
Shohei Wada [Mon, 24 Dec 2018 08:48:42 +0000 (17:48 +0900)]
Remove a trivial redundant code.
self.base.peek().is_none() case is already catched by the line above.

5 years agoChange \r detection much simpler.
Shohei Wada [Sun, 23 Dec 2018 22:25:15 +0000 (07:25 +0900)]
Change \r detection much simpler.

5 years agoAdd test cases.
Shohei Wada [Sun, 23 Dec 2018 21:18:00 +0000 (06:18 +0900)]
Add test cases.

5 years agoFix #2973 in Windows CRLF env.
Shohei Wada [Sun, 23 Dec 2018 21:12:28 +0000 (06:12 +0900)]
Fix #2973 in Windows CRLF env.

5 years agoMerge pull request #3258 from scampi/version-gate
Seiichi Uchida [Thu, 20 Dec 2018 04:30:58 +0000 (13:30 +0900)]
Merge pull request #3258 from scampi/version-gate

Clarify version gate used for #3229

5 years agoDo not modify original source code inside macro call
topecongiro [Wed, 19 Dec 2018 16:14:14 +0000 (01:14 +0900)]
Do not modify original source code inside macro call

5 years ago Add a test for #3004
topecongiro [Wed, 19 Dec 2018 16:13:18 +0000 (01:13 +0900)]
 Add a test for #3004

5 years agoclarify the version-gate used for the #3229 change
Stéphane Campinas [Wed, 19 Dec 2018 08:25:04 +0000 (09:25 +0100)]
clarify the version-gate used for the #3229 change

5 years agoadd a section to the Contributing.md file about version-gating formatting changes
Stéphane Campinas [Wed, 19 Dec 2018 08:24:02 +0000 (09:24 +0100)]
add a section to the Contributing.md file about version-gating formatting changes

5 years agoMerge pull request #3240 from Xanewok/parser-panic
Seiichi Uchida [Tue, 18 Dec 2018 02:30:08 +0000 (11:30 +0900)]
Merge pull request #3240 from Xanewok/parser-panic

Catch possible tokenizer panics

5 years agoMerge pull request #3250 from scampi/issue3229
Seiichi Uchida [Tue, 18 Dec 2018 02:22:45 +0000 (11:22 +0900)]
Merge pull request #3250 from scampi/issue3229

version-gate the trailing semicolon change of return statements inside a match arm

5 years agoFix trim_right/trim_left deprecation warnings (#3252)
Philipp Hansch [Tue, 18 Dec 2018 02:21:31 +0000 (03:21 +0100)]
Fix trim_right/trim_left deprecation warnings (#3252)

5 years agoMerge pull request #3249 from andjo403/assert_cli
Nick Cameron [Mon, 17 Dec 2018 07:52:18 +0000 (20:52 +1300)]
Merge pull request #3249 from andjo403/assert_cli

remove deprecated dependency assert_cli

5 years agouse the rustfmt function to find the bin
Andreas Jonson [Thu, 13 Dec 2018 21:49:22 +0000 (22:49 +0100)]
use the rustfmt function to find the bin

makes it possible to execute the test after a release build

5 years agoremove deprecated dependency assert_cli
Andreas Jonson [Thu, 13 Dec 2018 21:46:09 +0000 (22:46 +0100)]
remove deprecated dependency assert_cli

5 years agobump the version of formatting rules to Two
Stéphane Campinas [Fri, 14 Dec 2018 08:51:30 +0000 (09:51 +0100)]
bump the version of formatting rules to Two

5 years agoversion-gate the trailing semicolon change of return statements inside a match arm
Stéphane Campinas [Fri, 14 Dec 2018 08:48:20 +0000 (09:48 +0100)]
version-gate the trailing semicolon change of return statements inside a match arm

5 years agoDon't ignore parse error when constructing report
Igor Matuszewski [Thu, 13 Dec 2018 12:34:01 +0000 (13:34 +0100)]
Don't ignore parse error when constructing report

5 years agoUse non-panicking maybe_parser_from_source_str
Igor Matuszewski [Sat, 8 Dec 2018 22:22:23 +0000 (23:22 +0100)]
Use non-panicking maybe_parser_from_source_str

5 years agoAdd test asserting we catch Rust parser panics
Igor Matuszewski [Sat, 8 Dec 2018 21:32:35 +0000 (22:32 +0100)]
Add test asserting we catch Rust parser panics

5 years agoMerge pull request #3232 from ForsakenDurian/patch-1
Seiichi Uchida [Wed, 12 Dec 2018 05:42:21 +0000 (14:42 +0900)]
Merge pull request #3232 from ForsakenDurian/patch-1

Fix formatting in Configurations.md

5 years ago1.0.1
Nick Cameron [Sun, 9 Dec 2018 21:51:26 +0000 (10:51 +1300)]
1.0.1

5 years agoremove from README.md
Nick Cameron [Sun, 9 Dec 2018 19:36:09 +0000 (08:36 +1300)]
remove  from README.md

5 years agoMerge pull request #3236 from kngwyu/upd-syntax
Nick Cameron [Sat, 8 Dec 2018 18:15:55 +0000 (13:15 -0500)]
Merge pull request #3236 from kngwyu/upd-syntax

Update rustc-ap-syntax to 306.0

5 years agoUpdate rustc-ap-syntax to 306.0
kngwyu [Sat, 8 Dec 2018 05:39:52 +0000 (14:39 +0900)]
Update rustc-ap-syntax to 306.0

5 years agoFix formatting in Configurations.md
Isaac Ng [Fri, 7 Dec 2018 03:58:02 +0000 (14:58 +1100)]
Fix formatting in Configurations.md

fixes #3230

5 years agoMerge pull request #3231 from LucianBuzzo/minor-typo-fixes
Nick Cameron [Thu, 6 Dec 2018 16:15:28 +0000 (11:15 -0500)]
Merge pull request #3231 from LucianBuzzo/minor-typo-fixes

Fix minor typos and grammar

5 years agoFix minor typos and grammar
Lucian [Thu, 6 Dec 2018 15:31:43 +0000 (15:31 +0000)]
Fix minor typos and grammar

Signed-off-by: Lucian <lucian.buzzo@gmail.com>
5 years agorewrite_comment: fix block fallback when failing to rewrite an itemized block
Stéphane Campinas [Sat, 1 Dec 2018 22:28:08 +0000 (23:28 +0100)]
rewrite_comment: fix block fallback when failing to rewrite an itemized block

Close #3224

5 years agoMerge pull request #3223 from scampi/issue3213
Seiichi Uchida [Fri, 30 Nov 2018 00:15:31 +0000 (09:15 +0900)]
Merge pull request #3223 from scampi/issue3213

end expressions like return/continue/break with a semicolon

5 years agoend expressions like return/continue/break with a semicolon
Stéphane Campinas [Thu, 29 Nov 2018 19:39:07 +0000 (20:39 +0100)]
end expressions like return/continue/break with a semicolon

Close #3213

5 years agoMerge pull request #3222 from scampi/issue-3217
Nick Cameron [Wed, 28 Nov 2018 22:48:46 +0000 (11:48 +1300)]
Merge pull request #3222 from scampi/issue-3217

fix the visitor's starting position when visiting a labelled block

5 years agofix the visitor's starting position when visiting a labelled block
Stéphane Campinas [Wed, 28 Nov 2018 21:49:09 +0000 (22:49 +0100)]
fix the visitor's starting position when visiting a labelled block

Close #3217

5 years agoMerge pull request #3221 from alexreg/cosmetic-1
Nick Cameron [Wed, 28 Nov 2018 02:29:18 +0000 (15:29 +1300)]
Merge pull request #3221 from alexreg/cosmetic-1

Cosmetic improvements

5 years agoMerge pull request #3220 from topecongiro/bytecount/simd-accel
Nick Cameron [Wed, 28 Nov 2018 02:28:24 +0000 (15:28 +1300)]
Merge pull request #3220 from topecongiro/bytecount/simd-accel

Cargo update

5 years agoCosmetic improvements
Alexander Regueiro [Tue, 27 Nov 2018 23:03:09 +0000 (23:03 +0000)]
Cosmetic improvements

5 years agoCargo update
Seiichi Uchida [Tue, 27 Nov 2018 09:25:57 +0000 (18:25 +0900)]
Cargo update

Update bytecount to 0.4, and use its generic feature.

Closes #3216.

5 years agoAdd a version option
Nick Cameron [Tue, 27 Nov 2018 01:04:48 +0000 (14:04 +1300)]
Add a version option

5 years agoMerge pull request #3215 from scampi/issue3214
Nick Cameron [Mon, 26 Nov 2018 20:13:27 +0000 (09:13 +1300)]
Merge pull request #3215 from scampi/issue3214

allow to run a rustfmt command from cargo-fmt even when there is no target

5 years agoallow to run a rustfmt command from cargo-fmt even when there is no target
Stéphane Campinas [Mon, 26 Nov 2018 19:39:12 +0000 (20:39 +0100)]
allow to run a rustfmt command from cargo-fmt even when there is no target

5 years ago1.0.0
Nick Cameron [Mon, 19 Nov 2018 03:45:11 +0000 (16:45 +1300)]
1.0.0

5 years agofixup minor bugs
Nick Cameron [Mon, 19 Nov 2018 01:09:29 +0000 (14:09 +1300)]
fixup minor bugs

5 years agoMerge pull request #3177 from kestred/kstenerson/preserve-brace-leading-ws
Nick Cameron [Mon, 19 Nov 2018 00:35:09 +0000 (13:35 +1300)]
Merge pull request #3177 from kestred/kstenerson/preserve-brace-leading-ws

Format brace-delimited macros with a space after the name

5 years agoPrefer to break arguments over putting output type on the next line (#3190)
Seiichi Uchida [Sun, 18 Nov 2018 12:31:40 +0000 (21:31 +0900)]
Prefer to break arguments over putting output type on the next line  (#3190)

5 years agoAlways enforce exactly one space between `macro!` and braces (`{}`)
Kevin Stenerson [Sat, 17 Nov 2018 18:53:11 +0000 (11:53 -0700)]
Always enforce exactly one space between `macro!` and braces (`{}`)

5 years agoMerge pull request #3205 from matthiaskrgr/clippy
Nick Cameron [Sat, 17 Nov 2018 03:45:04 +0000 (16:45 +1300)]
Merge pull request #3205 from matthiaskrgr/clippy

fix a few clippy warnings

5 years agoPreserve possibly one whitespace for brace macros
Kevin Stenerson [Tue, 6 Nov 2018 05:48:49 +0000 (22:48 -0700)]
Preserve possibly one whitespace for brace macros

5 years agofix a few clippy warnings
Matthias Krüger [Fri, 16 Nov 2018 21:25:33 +0000 (22:25 +0100)]
fix a few clippy warnings

types.rs:
fix single_char_pattern (use character patters instead of string for .ends_with() and .starts_with()

patterns.rs
expr.rs
file_lines.rs:
fix into_iter_on_ref_ptr (use iter() or iter_mut() instead of into_iter()

tests/mod.rs:
check_files(): take Option<PathBuf> by reference

5 years ago0.99.9
Nick Cameron [Thu, 15 Nov 2018 09:37:31 +0000 (22:37 +1300)]
0.99.9

5 years agoUpdate rustc_ap_syntax
Nick Cameron [Thu, 15 Nov 2018 08:44:30 +0000 (21:44 +1300)]
Update rustc_ap_syntax

5 years agotest for #3128
Nick Cameron [Thu, 15 Nov 2018 08:37:42 +0000 (21:37 +1300)]
test for #3128

5 years agoDon't align comments on `extern crate`s
Nick Cameron [Thu, 15 Nov 2018 03:45:16 +0000 (16:45 +1300)]
Don't align comments on `extern crate`s

Closes #3128

5 years ago0.99.8
Seiichi Uchida [Wed, 14 Nov 2018 11:26:18 +0000 (20:26 +0900)]
0.99.8

5 years agoMerge pull request #3200 from scampi/issue-3194
Nick Cameron [Wed, 14 Nov 2018 04:08:05 +0000 (17:08 +1300)]
Merge pull request #3200 from scampi/issue-3194

compute the span after a struct-like item based on the ident description

5 years agocompute the span after a struct-like item based on the ident description
Stéphane Campinas [Tue, 13 Nov 2018 20:10:30 +0000 (21:10 +0100)]
compute the span after a struct-like item based on the ident description

5 years agoMerge pull request #3189 from scampi/issue3032
Nick Cameron [Sun, 11 Nov 2018 20:56:35 +0000 (09:56 +1300)]
Merge pull request #3189 from scampi/issue3032

fix logic for adding or not a newline after a missed span

5 years agofix logic for adding or not a newline after a missed span
Stéphane Campinas [Fri, 9 Nov 2018 19:50:07 +0000 (20:50 +0100)]
fix logic for adding or not a newline after a missed span

5 years agoMerge pull request #3175 from kestred/kstenerson/delimited-overflow
Nick Cameron [Fri, 9 Nov 2018 02:46:23 +0000 (15:46 +1300)]
Merge pull request #3175 from kestred/kstenerson/delimited-overflow

Add config option to more aggressively allow overflow

5 years agoAdd tests that include comments before the overflow-able params
Kevin Stenerson [Fri, 9 Nov 2018 02:38:01 +0000 (19:38 -0700)]
Add tests that include comments before the overflow-able params

5 years agoReplace always true conditionals with `true`
Kevin Stenerson [Fri, 9 Nov 2018 02:26:12 +0000 (19:26 -0700)]
Replace always true conditionals with `true`

5 years agoMerge pull request #3188 from scampi/issue3124
Nick Cameron [Fri, 9 Nov 2018 02:26:05 +0000 (15:26 +1300)]
Merge pull request #3188 from scampi/issue3124

do not add a newline after a missed span if it is the end of a block comment

5 years agoMerge pull request #3183 from scampi/issue3182
Nick Cameron [Fri, 9 Nov 2018 02:14:44 +0000 (15:14 +1300)]
Merge pull request #3183 from scampi/issue3182

do not wrap comments in doctest to avoid failing doctest runs

5 years agodo not add a newline after a missed span if it is the end of a block comment
Stéphane Campinas [Thu, 8 Nov 2018 21:44:59 +0000 (22:44 +0100)]
do not add a newline after a missed span if it is the end of a block comment

5 years agoCargo update (#3186)
Seiichi Uchida [Thu, 8 Nov 2018 14:16:13 +0000 (23:16 +0900)]
Cargo update (#3186)

Update `rustc-ap-*` crates to 290.0.0.

5 years agoDo not count /*/ as both start and end comment (#3185)
Alan Du [Thu, 8 Nov 2018 05:28:08 +0000 (00:28 -0500)]
Do not count /*/ as both start and end comment (#3185)

5 years agoMerge pull request #3181 from scampi/issue3131
Seiichi Uchida [Thu, 8 Nov 2018 05:15:09 +0000 (14:15 +0900)]
Merge pull request #3181 from scampi/issue3131

fix the logic for retaining a comment before the arrow in a match

5 years ago0.99.7
Nick Cameron [Wed, 7 Nov 2018 20:24:46 +0000 (09:24 +1300)]
0.99.7

5 years agodo not wrap comments in doctest to avoid failing doctest runs
Stéphane Campinas [Wed, 7 Nov 2018 15:48:39 +0000 (16:48 +0100)]
do not wrap comments in doctest to avoid failing doctest runs

5 years agofix the logic for retaining a comment before the arrow in a match
Stéphane Campinas [Wed, 7 Nov 2018 14:00:33 +0000 (15:00 +0100)]
fix the logic for retaining a comment before the arrow in a match

5 years agoTrim the indentation on macros which heuristically appear to use block-style indentat...
Kevin Stenerson [Wed, 7 Nov 2018 08:49:53 +0000 (01:49 -0700)]
Trim the indentation on macros which heuristically appear to use block-style indentation (#3178)

5 years agoAdd docs to Configuration guide
Kevin Stenerson [Tue, 6 Nov 2018 04:50:54 +0000 (21:50 -0700)]
Add docs to Configuration guide

5 years agoAdd config option to more aggressively allow overflow
Kevin Stenerson [Tue, 6 Nov 2018 04:12:40 +0000 (21:12 -0700)]
Add config option to more aggressively allow overflow

5 years agoMerge pull request #3172 from scampi/issue3153
Nick Cameron [Mon, 5 Nov 2018 21:23:30 +0000 (10:23 +1300)]
Merge pull request #3172 from scampi/issue3153

trim the start of a line when wrapping an item in preparation for formatting

5 years agoMerge pull request #3171 from lqd/whitespace_jam
Nick Cameron [Mon, 5 Nov 2018 21:12:35 +0000 (10:12 +1300)]
Merge pull request #3171 from lqd/whitespace_jam

normalize_doc_attributes: remove whitespace from the doc comment opener

5 years agotrim the start of a line when wrapping an item in preparation for formatting
Stéphane Campinas [Mon, 5 Nov 2018 19:22:06 +0000 (20:22 +0100)]
trim the start of a line when wrapping an item in preparation for formatting

5 years agonormalize_doc_attributes: remove leading whitespace from the doc comment opener
Rémy Rakic [Mon, 5 Nov 2018 17:24:36 +0000 (18:24 +0100)]
normalize_doc_attributes: remove leading whitespace from the doc comment opener

Remove possible whitespace from the `CommentStyle::opener()` so that the literal itself has control over the comment's leading spaces.

This is most useful for tools, such as bindgen, to allow for example: machine-readable comments with precise syntax rules, or idempotently round-tripping between the proc-macro API and rustfmt.

5 years agoMerge pull request #3165 from scampi/alignment
Nick Cameron [Sun, 4 Nov 2018 23:59:54 +0000 (12:59 +1300)]
Merge pull request #3165 from scampi/alignment

fix alignment of a struct's fields with the visual style

5 years agofix alignment of a struct's fields with the visual style
Stéphane Campinas [Sun, 4 Nov 2018 09:51:38 +0000 (10:51 +0100)]
fix alignment of a struct's fields with the visual style

- rewrite_with_alignment was called from the expr module with the wrong
  shape that missed the extra offset needed for the visual style
- rewrite_with_alignment was indenting the given shape although that
  should have been the caller's responsability

5 years agoMerge pull request #3145 from otavio/allow-failure-for-crater
Nick Cameron [Thu, 1 Nov 2018 21:08:39 +0000 (10:08 +1300)]
Merge pull request #3145 from otavio/allow-failure-for-crater

CI: only run unit tests for `crater`

5 years agoTravis CI: Move `futures-rs` out from allow-failures
Otavio Salvador [Thu, 1 Nov 2018 20:56:54 +0000 (17:56 -0300)]
Travis CI: Move `futures-rs` out from allow-failures

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoCI: Rework integration script so only lib unit tests are run for crater
Otavio Salvador [Sun, 28 Oct 2018 01:05:46 +0000 (22:05 -0300)]
CI: Rework integration script so only lib unit tests are run for crater

Refs: https://github.com/rust-lang-nursery/crater/issues/358

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
5 years agoMerge pull request #3159 from scampi/issue-3132
Nick Cameron [Wed, 31 Oct 2018 01:33:11 +0000 (14:33 +1300)]
Merge pull request #3159 from scampi/issue-3132

The method trim_left_preserve_layout didn't handle tabs properly.

5 years agoMerge pull request #3152 from topecongiro/do-not-override-edition-in-rustfmt-toml
Nick Cameron [Wed, 31 Oct 2018 00:31:24 +0000 (13:31 +1300)]
Merge pull request #3152 from topecongiro/do-not-override-edition-in-rustfmt-toml

Use edition in rustfmt.toml when no command line argument is passed

5 years agoThe method trim_left_preserve_layout didn't handle tabs properly.
Stéphane Campinas [Tue, 30 Oct 2018 00:09:09 +0000 (01:09 +0100)]
The method trim_left_preserve_layout didn't handle tabs properly.

This is fixed by taking the method macros::indent_macro_snippet which
essentially does the same: it indents a paragraph while preserving the
layout.