]>
git.lizzy.rs Git - rust.git/log
Nick Cameron [Sun, 9 Dec 2018 19:36:09 +0000 (08:36 +1300)]
remove from README.md
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
kngwyu [Sat, 8 Dec 2018 05:39:52 +0000 (14:39 +0900)]
Update rustc-ap-syntax to 306.0
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
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>
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
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
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
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
Nick Cameron [Wed, 28 Nov 2018 02:29:18 +0000 (15:29 +1300)]
Merge pull request #3221 from alexreg/cosmetic-1
Cosmetic improvements
Nick Cameron [Wed, 28 Nov 2018 02:28:24 +0000 (15:28 +1300)]
Merge pull request #3220 from topecongiro/bytecount/simd-accel
Cargo update
Alexander Regueiro [Tue, 27 Nov 2018 23:03:09 +0000 (23:03 +0000)]
Cosmetic improvements
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.
Nick Cameron [Tue, 27 Nov 2018 01:04:48 +0000 (14:04 +1300)]
Add a version option
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
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
Nick Cameron [Mon, 19 Nov 2018 03:45:11 +0000 (16:45 +1300)]
1.0.0
Nick Cameron [Mon, 19 Nov 2018 01:09:29 +0000 (14:09 +1300)]
fixup minor bugs
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
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)
Kevin Stenerson [Sat, 17 Nov 2018 18:53:11 +0000 (11:53 -0700)]
Always enforce exactly one space between `macro!` and braces (`{}`)
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
Kevin Stenerson [Tue, 6 Nov 2018 05:48:49 +0000 (22:48 -0700)]
Preserve possibly one whitespace for brace macros
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
Nick Cameron [Thu, 15 Nov 2018 09:37:31 +0000 (22:37 +1300)]
0.99.9
Nick Cameron [Thu, 15 Nov 2018 08:44:30 +0000 (21:44 +1300)]
Update rustc_ap_syntax
Nick Cameron [Thu, 15 Nov 2018 08:37:42 +0000 (21:37 +1300)]
test for #3128
Nick Cameron [Thu, 15 Nov 2018 03:45:16 +0000 (16:45 +1300)]
Don't align comments on `extern crate`s
Closes #3128
Seiichi Uchida [Wed, 14 Nov 2018 11:26:18 +0000 (20:26 +0900)]
0.99.8
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
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
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
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
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
Kevin Stenerson [Fri, 9 Nov 2018 02:38:01 +0000 (19:38 -0700)]
Add tests that include comments before the overflow-able params
Kevin Stenerson [Fri, 9 Nov 2018 02:26:12 +0000 (19:26 -0700)]
Replace always true conditionals with `true`
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
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
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
Seiichi Uchida [Thu, 8 Nov 2018 14:16:13 +0000 (23:16 +0900)]
Cargo update (#3186)
Update `rustc-ap-*` crates to 290.0.0.
Alan Du [Thu, 8 Nov 2018 05:28:08 +0000 (00:28 -0500)]
Do not count /*/ as both start and end comment (#3185)
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
Nick Cameron [Wed, 7 Nov 2018 20:24:46 +0000 (09:24 +1300)]
0.99.7
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
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
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)
Kevin Stenerson [Tue, 6 Nov 2018 04:50:54 +0000 (21:50 -0700)]
Add docs to Configuration guide
Kevin Stenerson [Tue, 6 Nov 2018 04:12:40 +0000 (21:12 -0700)]
Add config option to more aggressively allow overflow
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
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
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
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.
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
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
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`
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>
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>
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.
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
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.
Seiichi Uchida [Tue, 30 Oct 2018 06:26:53 +0000 (15:26 +0900)]
Merge pull request #3155 from emilio/missed-spans-bug
missed-spans: Fix bogus check.
Emilio Cobos Álvarez [Tue, 30 Oct 2018 02:11:14 +0000 (03:11 +0100)]
missed-spans: Fix bogus check.
I don't really know what it's trying to do, but forgetting about everything
you've seen before when you see whitespace followed by a semicolon doesn't look
right to me, and absolutely no tests were hitting that.
This check was introduced in
5ecdd072d6745cd70ec7c37eea8dbf1f3ee42f2e , however
it was wrong even at that point, and now rustfmt still passes that test,
regardless of macro name.
Fixes #3154.
Seiichi Uchida [Mon, 29 Oct 2018 14:01:51 +0000 (23:01 +0900)]
Merge pull request #3150 from flip1995/patch-1
Remove deprecated cfg_attr from README
Seiichi Uchida [Mon, 29 Oct 2018 13:53:29 +0000 (22:53 +0900)]
Use edition in rustfmt.toml when no command line argument is passed
Philipp Krones [Mon, 29 Oct 2018 09:27:19 +0000 (10:27 +0100)]
Remove deprecated cfg_attr from README
`tool_attributes` are stable since 1.30. The old `cfg_attr(rustfmt, rustfmt_skip)` attributes aren't necessary anymore and everyone should switch to `#[rustfmt::skip]` sooner or later.
There is also a Clippy lint in the making for this: rust-lang-nursery/rust-clippy#3123
Nick Cameron [Sun, 28 Oct 2018 22:29:51 +0000 (11:29 +1300)]
Merge pull request #3141 from dfyz/issue-2810
Try to fix formatting failures on Windows (issue #2810)
Nick Cameron [Sun, 28 Oct 2018 22:22:05 +0000 (11:22 +1300)]
Merge pull request #3144 from otavio/issues-3143
cargo-fmt: Fix splitting of targets across editions
Nick Cameron [Sun, 28 Oct 2018 22:08:38 +0000 (11:08 +1300)]
Merge pull request #3142 from topecongiro/issue-3139
Do not remove path disambiugator inside macro
Ivan Komarov [Sat, 27 Oct 2018 01:01:37 +0000 (04:01 +0300)]
Fix formatting failures on Windows
When newline_style is set to Windows, an empty line inside of a macro
results in `\r` being passed to the `fold()` in `MacroBranch::rewrite()`.
`\r` is technically not an empty string, so we try to indent it, leaving
trailing whitespaces behind, even though that was not intended
(as far as I can see).
This commit replaces the `!l.is_empty()` check with calling
`is_empty_line()`, since trying to indent any whitespace-only string
will probably result in problematic trailing whitespaces.
Fixes: #2810
Otavio Salvador [Sat, 27 Oct 2018 14:55:41 +0000 (11:55 -0300)]
cargo-fmt: Fix splitting of targets across editions
When I reworked the code, it ended not generating the complete list of
need targets. Fix it.
Fixes: #3143.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Sat, 27 Oct 2018 14:49:48 +0000 (11:49 -0300)]
cargo-fmt: Add --edition when printing the command
By mistake, it was forgotten to print out the edition in use when
printing the rustcmd command. Fix it.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Seiichi Uchida [Sat, 27 Oct 2018 02:22:40 +0000 (11:22 +0900)]
Do not remove path disambiugator inside macro
Seiichi Uchida [Sat, 27 Oct 2018 02:22:18 +0000 (11:22 +0900)]
Add a test for #3139
Nick Cameron [Fri, 26 Oct 2018 23:29:59 +0000 (12:29 +1300)]
Merge pull request #3140 from matthiaskrgr/redundant_clones
fix clippy::redundant_clones warnings.
Matthias Krüger [Fri, 26 Oct 2018 12:45:25 +0000 (14:45 +0200)]
fix clippy::redundant_clones warnings.
Nick Cameron [Fri, 26 Oct 2018 08:26:26 +0000 (21:26 +1300)]
Merge pull request #3138 from topecongiro/issue-3137
Simplify handling of parens around generic bound trait
Seiichi Uchida [Fri, 26 Oct 2018 07:36:11 +0000 (16:36 +0900)]
Simplify handling parens on generic bound trait
Seiichi Uchida [Fri, 26 Oct 2018 07:36:01 +0000 (16:36 +0900)]
Add a test for #3137
Nick Cameron [Thu, 25 Oct 2018 02:03:59 +0000 (15:03 +1300)]
Merge pull request #3134 from otavio/issue-3104
Stabilize `edition` configuration option
Otavio Salvador [Thu, 25 Oct 2018 01:31:42 +0000 (22:31 -0300)]
Stabilize `edition` configuration option
Refs: #3104.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Nick Cameron [Thu, 25 Oct 2018 01:35:42 +0000 (14:35 +1300)]
Merge pull request #3133 from otavio/rework-readme
README: remove old requirement for Rust 2018 edition use
Otavio Salvador [Tue, 23 Oct 2018 04:50:27 +0000 (01:50 -0300)]
README: remove old requirement for Rust 2018 edition use
From now on, the `Cargo.toml` is taken into account when triggering
formatting using `cargo fmt`.
It is considered editor's duty to pass the proper `--edition` argument
for `rustfmt` if it is being called manually.
Refs: #3104.
Refs: #3129.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Nick Cameron [Thu, 25 Oct 2018 00:39:40 +0000 (13:39 +1300)]
Merge pull request #3129 from otavio/issue-3104
cargo-fmt: detect Rust edition in use
Nick Cameron [Wed, 24 Oct 2018 23:09:12 +0000 (12:09 +1300)]
Merge pull request #3113 from scampi/issue3105
Fix handling of code that is annotated with rustfmt::skip.
Otavio Salvador [Tue, 23 Oct 2018 05:33:46 +0000 (02:33 -0300)]
cargo-fmt: Take into account the edition for each target
When formatting the crate, with `cargo fmt`, it parses each target
with the specific Rust edition.
Fixes: #3104.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Stéphane Campinas [Tue, 23 Oct 2018 23:24:56 +0000 (01:24 +0200)]
keep track of lines which formatting was disabled in order to prevent indentation which would cause code right-shifting
Stéphane Campinas [Thu, 18 Oct 2018 20:58:45 +0000 (22:58 +0200)]
Fix handling of code that is annotated with rustfmt::skip.
A rustfmt::skip'ed block is indented although original lines are
returned. In order to resolve this, the leading whitespaces are trimmed
on each line while retaining the layout; this leaves the skipped code
to be indented as necessary by the caller.
Nick Cameron [Wed, 24 Oct 2018 05:13:42 +0000 (18:13 +1300)]
Merge pull request #3130 from JoshBrudnak/master
Added crates to the non-alphabetical treated imports
Nick Cameron [Wed, 24 Oct 2018 05:13:26 +0000 (18:13 +1300)]
Remove the source test file
Nick Cameron [Wed, 24 Oct 2018 02:07:09 +0000 (15:07 +1300)]
Revert "Use `width_heuristics` in the options docs"
This reverts commit
fa3cadf62c11cd8163f08029026a8475ad2b60fd .
Nick Cameron [Wed, 24 Oct 2018 02:01:14 +0000 (15:01 +1300)]
Merge pull request #3116 from kellerkindt/patch-1
Add howto for CLion / IntelliJ IDE integration
JoshBrudnak [Tue, 23 Oct 2018 23:00:42 +0000 (19:00 -0400)]
Added test for crate non-alphabetizing
kellerkindt [Tue, 23 Oct 2018 07:07:46 +0000 (09:07 +0200)]
Add howto for CLion / IntelliJ IDE integration
JoshBrudnak [Mon, 22 Oct 2018 22:49:10 +0000 (18:49 -0400)]
Treat crates non-alphabetically Fixes: #3118
Otavio Salvador [Tue, 23 Oct 2018 05:33:38 +0000 (02:33 -0300)]
rustfmt: add support to specify the Rust edition as argument
The new `--edition` command line argument allow the setting of the
desired Rust edition to be used.
Refs: #3104.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Tue, 23 Oct 2018 05:33:36 +0000 (02:33 -0300)]
lib: export config::Edition so it can be used externally
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Tue, 23 Oct 2018 05:33:33 +0000 (02:33 -0300)]
config: use 2015 as default Edition
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Tue, 23 Oct 2018 05:33:30 +0000 (02:33 -0300)]
Cargo.lock: update `cargo_metadata` to 0.6.1 release
The update is especially important as it adds support for the
`edition` field handling, when parsing `cargo` metadata.
Refs: #3104.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Tue, 23 Oct 2018 05:33:25 +0000 (02:33 -0300)]
rustfmt: avoid duplicating the error handling for `--emit`
There is no need to produce the error message again as it is already
produced by the helper method that does the emit mode validation.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Nick Cameron [Tue, 23 Oct 2018 01:59:14 +0000 (14:59 +1300)]
Use `width_heuristics` in the options docs
It was using an older name