]>
git.lizzy.rs Git - rust.git/log
Caleb Cartwright [Sun, 14 Mar 2021 18:43:33 +0000 (13:43 -0500)]
deps: bump rustc-ap crates to v709
Caleb Cartwright [Sun, 28 Mar 2021 21:25:30 +0000 (16:25 -0500)]
refactor: apply rustc mod parsing changes
Caleb Cartwright [Sun, 14 Mar 2021 18:16:52 +0000 (13:16 -0500)]
chore: apply pattern parsing changes
Caleb Cartwright [Sun, 14 Mar 2021 18:15:48 +0000 (13:15 -0500)]
chore: add span creation util function
Caleb Cartwright [Sun, 14 Mar 2021 18:10:19 +0000 (13:10 -0500)]
deps: bump rustc-ap crates to v708
Yuki Okushi [Thu, 18 Mar 2021 09:07:54 +0000 (18:07 +0900)]
Fix a `legacy_derive_helpers` warning
Joshua Nelson [Wed, 17 Feb 2021 04:33:20 +0000 (23:33 -0500)]
Fix some clippy warnings
This commit can be replicated with
`cargo clippy --fix -Z unstable-options && cargo +nightly-2021-02-10 fmt`.
David Bar-On [Fri, 8 Jan 2021 13:56:05 +0000 (15:56 +0200)]
Add the use of rewrite_assign_rhs_with_comments to 1.x
David Bar-On [Tue, 16 Feb 2021 14:35:47 +0000 (16:35 +0200)]
Fix for issue 4603 about extra macro body indentation (third version)
Joshua Nelson [Wed, 17 Feb 2021 04:26:01 +0000 (23:26 -0500)]
Fix warnings
- Fix nightly warning about `format!`
- Remove unused functions and fields
Thomas Eizinger [Thu, 11 Feb 2021 06:54:52 +0000 (17:54 +1100)]
Bump rustc-ap-* crates to version 706
Caleb Cartwright [Sun, 7 Feb 2021 17:47:20 +0000 (11:47 -0600)]
meta: bump to v1.4.36
Caleb Cartwright [Sat, 6 Feb 2021 21:13:14 +0000 (15:13 -0600)]
deps: apply rustc-ap v705 changes to itemkind variants
Caleb Cartwright [Sat, 6 Feb 2021 21:25:23 +0000 (15:25 -0600)]
chore: bump rust toolchain version
Caleb Cartwright [Sat, 6 Feb 2021 21:12:38 +0000 (15:12 -0600)]
deps: bump rustc-ap crates to v705
Caleb Cartwright [Thu, 4 Feb 2021 02:27:17 +0000 (20:27 -0600)]
meta: bump version to v1.4.35
Caleb Cartwright [Wed, 3 Feb 2021 04:01:34 +0000 (22:01 -0600)]
chore: bump toolchain file
Caleb Cartwright [Wed, 3 Feb 2021 03:56:22 +0000 (21:56 -0600)]
deps: bump rustc-ap to v702
Caleb Cartwright [Sun, 31 Jan 2021 22:08:00 +0000 (16:08 -0600)]
deps: bump rustc-ap crates to v701.0.0
Dave Rolsky [Wed, 3 Feb 2021 04:54:12 +0000 (23:54 -0500)]
Add arch name to archive files created in the upload workflow (#4679)
* Add arch name to archive files created in the upload workflow
* Fix arch names in matrix.build key to include arch name as well
Caleb Cartwright [Fri, 29 Jan 2021 03:21:26 +0000 (21:21 -0600)]
meta: bump to v1.4.34
Caleb Cartwright [Fri, 29 Jan 2021 01:14:44 +0000 (19:14 -0600)]
fix: don't insert trailing comma on struct lit rest in mac def
Caleb Cartwright [Fri, 29 Jan 2021 01:13:48 +0000 (19:13 -0600)]
tests: add case for issue 4675
Caleb Cartwright [Thu, 28 Jan 2021 02:21:07 +0000 (20:21 -0600)]
meta: bump to v1.4.33
Caleb Cartwright [Thu, 28 Jan 2021 01:46:32 +0000 (19:46 -0600)]
chore: backport some empty block check fixes
Caleb Cartwright [Thu, 7 Jan 2021 02:25:11 +0000 (20:25 -0600)]
refactor: cleanup block check for statements
vallentin [Sun, 17 Jan 2021 17:33:47 +0000 (18:33 +0100)]
Fixed semicolon getting moved into comment (fixes #4646)
vallentin [Sun, 17 Jan 2021 17:56:04 +0000 (18:56 +0100)]
Added 4646 test case
Michael Morgan [Tue, 12 Jan 2021 19:29:11 +0000 (14:29 -0500)]
Add imports_granularity="Item".
This option splits all imports into their own `use` statement.
Sean Klein [Tue, 19 Jan 2021 18:40:58 +0000 (13:40 -0500)]
fix: Avoid incorrect global 'cfg_if' Symbol interning
Fixes #4656
Caleb Cartwright [Wed, 27 Jan 2021 04:41:04 +0000 (22:41 -0600)]
chore: update Changelog with const generic backports
Ayaz Hafiz [Tue, 7 Jul 2020 14:31:09 +0000 (07:31 -0700)]
Include const generic type bounds in their spans
Closes #4310
topecongiro [Tue, 30 Jun 2020 09:19:13 +0000 (18:19 +0900)]
Do not duplicate const keyword on parameters
Seiichi Uchida [Wed, 27 May 2020 03:31:14 +0000 (12:31 +0900)]
Use the span after generics and where clause (#4208)
hafiz [Sun, 31 May 2020 08:36:08 +0000 (03:36 -0500)]
Include constness in impl blocks (#4215)
Closes #4084
Geoffry Song [Wed, 13 Jan 2021 01:30:26 +0000 (17:30 -0800)]
Tweak imports_granularity documentation
Geoffry Song [Sun, 10 Jan 2021 05:15:03 +0000 (21:15 -0800)]
Disable deprecated_option_merge_imports tests on non-nightly
Geoffry Song [Wed, 16 Dec 2020 01:19:54 +0000 (17:19 -0800)]
Rename `merge_imports` to `imports_granularity` and add a `Module` option.
This renames the existing `true`/`false` options to `Crate`/`Never`, then adds a
new `Module` option which causes imports to be grouped together by their
originating module.
Caleb Cartwright [Sat, 16 Jan 2021 02:54:48 +0000 (20:54 -0600)]
meta: bump version v1.4.32
Caleb Cartwright [Sat, 16 Jan 2021 02:54:15 +0000 (20:54 -0600)]
meta: update license years
Caleb Cartwright [Tue, 12 Jan 2021 23:40:53 +0000 (17:40 -0600)]
refactor: remove unneeded clone
Caleb Cartwright [Tue, 12 Jan 2021 23:39:03 +0000 (17:39 -0600)]
fix: indentation issue on generic bounds
Caleb Cartwright [Sat, 9 Jan 2021 18:45:43 +0000 (12:45 -0600)]
meta: bump to v1.4.31
Caleb Cartwright [Sat, 9 Jan 2021 18:45:08 +0000 (12:45 -0600)]
ci: add mingw to path for asset upload job
Caleb Cartwright [Sat, 9 Jan 2021 17:23:36 +0000 (11:23 -0600)]
fix: maintain redundant semis on items in statement pos
Mara Bos [Sat, 2 Jan 2021 01:21:48 +0000 (02:21 +0100)]
Update Cargo.lock.
Mara Bos [Sat, 2 Jan 2021 01:21:22 +0000 (02:21 +0100)]
Add 2021 test.
Mara Bos [Fri, 1 Jan 2021 22:57:19 +0000 (23:57 +0100)]
Fix expected macro formatting test output.
Mara Bos [Fri, 1 Jan 2021 19:47:30 +0000 (20:47 +0100)]
Account for new ast::GenericParamKind::Const::default in rust_ast.
Mara Bos [Fri, 1 Jan 2021 19:45:03 +0000 (20:45 +0100)]
Bump rustc-ap to v697.
Mara Bos [Fri, 1 Jan 2021 16:00:52 +0000 (17:00 +0100)]
Fixes for new rustc changes.
Mara Bos [Fri, 1 Jan 2021 16:00:40 +0000 (17:00 +0100)]
Add support for edition 2021.
Caleb Cartwright [Fri, 1 Jan 2021 16:46:20 +0000 (10:46 -0600)]
ci: fix linking issue on windows gnu jobs
Caleb Cartwright [Sun, 20 Dec 2020 18:04:41 +0000 (12:04 -0600)]
meta: bump to v1.4.30
Seiichi Uchida [Wed, 9 Sep 2020 03:52:52 +0000 (12:52 +0900)]
Format error and typeof types (#4416)
* Add a test for #4357
* Format error and typeof types
Stéphane Campinas [Mon, 7 Dec 2020 12:08:45 +0000 (13:08 +0100)]
Fix rewrite of closures with a return type
If the closure's body fits in a line, the block is removed but it is
necessary if the closure has a return type.
Caleb Cartwright [Fri, 11 Dec 2020 18:19:30 +0000 (12:19 -0600)]
fix: don't strip nonexistent comma in derive
Caleb Cartwright [Sat, 5 Dec 2020 03:47:29 +0000 (21:47 -0600)]
meta: bump to v1.4.29
David Tolnay [Tue, 1 Dec 2020 03:21:11 +0000 (19:21 -0800)]
Add negative impl test
David Tolnay [Tue, 1 Dec 2020 02:57:07 +0000 (18:57 -0800)]
Preserve polarity on negative non-trait impl
Caleb Cartwright [Sun, 29 Nov 2020 18:32:15 +0000 (12:32 -0600)]
meta: bump to v1.4.28
WhizSid [Sun, 18 Oct 2020 17:02:46 +0000 (22:32 +0530)]
Comment between typebounds (#4474)
* Test cases and get spans
* Fixed type bounds
* Fixed issue of test cases
* Fixed first test case issue
* Removed unwanted whitespaces
* Removed tmp files
Caleb Cartwright [Sun, 29 Nov 2020 00:30:28 +0000 (18:30 -0600)]
fix: backport some imports for cherry-picked commit
WhizSid [Tue, 3 Nov 2020 03:44:15 +0000 (09:14 +0530)]
Fixed comment dropped between & and type issue (#4482)
* Fixed comment dropped between & and type issue
* Reduced nesting levels and avoided duplications
* Removed extra allocations
WhizSid [Fri, 9 Oct 2020 00:27:04 +0000 (05:57 +0530)]
Fixed 'Comment removed between type name and =' issue (#4448)
* Fixed Comment removed between type name and = issue
* Fixed where clause issue and pass the full span
* has_where condition inline
* Fixed indentation error on where clause
* Removed tmp file
Caleb Cartwright [Sun, 29 Nov 2020 00:23:00 +0000 (18:23 -0600)]
fix: apply rustc-ap updates to backported commit
hafiz [Mon, 8 Jun 2020 01:31:24 +0000 (20:31 -0500)]
Pick up comments between visibility modifier and item name (#4239)
* Pick up comments between visibility modifier and item name
I don't think this hurts to fix. #2781, which surfaced this issue, has
a number of comments relating to similar but slightly different issues
(i.e. dropped comments in other places). I can mark #2781 as closed and
then will open new issues for the comments that are not already resolved
or tracked.
Closes #2781
* fixup! Pick up comments between visibility modifier and item name
* fixup! Pick up comments between visibility modifier and item name
Caleb Cartwright [Sun, 29 Nov 2020 00:03:48 +0000 (18:03 -0600)]
tests: backport an additional test case
Adam H. Leventhal [Wed, 22 Apr 2020 05:54:08 +0000 (22:54 -0700)]
tests
Adam H. Leventhal [Wed, 22 Apr 2020 05:57:54 +0000 (22:57 -0700)]
fixes #4115, #4029, #3898
hafiz [Sun, 10 May 2020 11:54:46 +0000 (06:54 -0500)]
Compare code block line indentation with config whitespace (#4166)
Previously the indetation of a line was compared with the configured
number of spaces per tab, which could cause lines that were formatted
with hard tabs not to be recognized as indented ("\t".len() < " ".len()).
Closes #4152
David Tolnay [Sun, 29 Nov 2020 02:47:32 +0000 (18:47 -0800)]
Remove `async fn` from extern block tests
Ayaz Hafiz [Fri, 10 Jul 2020 02:56:46 +0000 (19:56 -0700)]
Don't drop blocks on foreign functions
A code like
```rust
extern "C" {
fn f() {
fn g() {}
}
}
```
is incorrect and does not compile. Today rustfmt formats this in a way
that is correct:
```rust
extern "C" {
fn f();
}
```
But this loses information, and doesn't have to be done because we know
the content of the block if it is present. During development I don't
think rustfmt should drop the block in this context.
Closes #4313
Ayaz Hafiz [Tue, 30 Jun 2020 02:36:31 +0000 (19:36 -0700)]
Properly format function signature in extern blocks
Closes #4288
And we get to drop a method, which I think is a win :)
topecongiro [Tue, 30 Jun 2020 02:34:05 +0000 (11:34 +0900)]
Add a test
Caleb Cartwright [Sat, 28 Nov 2020 21:03:06 +0000 (15:03 -0600)]
chore: run rustfmt against source
Caleb Cartwright [Sat, 28 Nov 2020 03:18:39 +0000 (21:18 -0600)]
feat: support underscore expressions
Caleb Cartwright [Sat, 28 Nov 2020 03:30:27 +0000 (21:30 -0600)]
refactor: update cfg_if attr parsing
Caleb Cartwright [Sat, 28 Nov 2020 03:09:33 +0000 (21:09 -0600)]
feat: support struct/slice destructuring
Caleb Cartwright [Sat, 28 Nov 2020 20:58:10 +0000 (14:58 -0600)]
deps: minor rustc_ast changes for v691
Caleb Cartwright [Sat, 28 Nov 2020 20:54:03 +0000 (14:54 -0600)]
deps: bump rustc-ap crates to v691
Caleb Cartwright [Sat, 21 Nov 2020 01:06:23 +0000 (19:06 -0600)]
deps: bump rustc-ap to v687
meiomorphism [Wed, 25 Nov 2020 12:31:10 +0000 (04:31 -0800)]
fix: don't force a newline after an empty where clause
Fixes #4547.
Matt [Mon, 16 Nov 2020 23:24:03 +0000 (18:24 -0500)]
Option to create groups for std, external crates, and other imports
Backport of
17d90ca .
Caleb Cartwright [Mon, 16 Nov 2020 19:25:02 +0000 (13:25 -0600)]
meta: bump to v1.4.27
Caleb Cartwright [Mon, 16 Nov 2020 19:24:51 +0000 (13:24 -0600)]
ci: update GHA workflows
Caleb Cartwright [Mon, 16 Nov 2020 18:39:26 +0000 (12:39 -0600)]
fix: don't drop leading comments in extern
Caleb Cartwright [Sat, 14 Nov 2020 04:33:57 +0000 (22:33 -0600)]
meta: bump version to v1.4.26
Caleb Cartwright [Sat, 14 Nov 2020 04:17:07 +0000 (22:17 -0600)]
ci: restrict GHA workflow triggers on push
Caleb Cartwright [Sat, 14 Nov 2020 03:42:37 +0000 (21:42 -0600)]
tests: attributed comment-only blocks
WhizSid [Thu, 15 Oct 2020 02:08:58 +0000 (07:38 +0530)]
Fixed 'Incorrect comment indent inside if/else' issue. (#4459)
* Added test cases
* Fixed if condition comment issue
* Fixed extern C issue
* Removed previous test case
* Removed tmp file
* honor the authors intent
* Changed the file name to its original name
* Removed extra whitespace
Ayaz Hafiz [Sat, 15 Aug 2020 20:34:06 +0000 (13:34 -0700)]
Correctly create artificial span for formatting closure body
This commit partially reverts #3934, opting to create a span that covers
the entire body of a closure when formatting a closure body with a
block-formatting strategy, rather than having the block-formatting code
determine if the visitor pointer should be rewound. The problem with
rewinding the visitor pointer is it may be incorrect for other (i.e.
non-artificial) AST nodes, as in the case of #4382.
Closes #4382
Ayaz Hafiz [Sat, 15 Aug 2020 20:38:06 +0000 (13:38 -0700)]
fixup! Correctly create artificial span for formatting closure body
Caleb Cartwright [Wed, 11 Nov 2020 02:18:22 +0000 (20:18 -0600)]
meta: release v1.4.25
Caleb Cartwright [Wed, 11 Nov 2020 02:07:42 +0000 (20:07 -0600)]
feat: don't insert semi in macro_rules arm body
Caleb Cartwright [Fri, 6 Nov 2020 01:45:56 +0000 (19:45 -0600)]
meta: release v1.4.24
Caleb Cartwright [Fri, 6 Nov 2020 01:30:56 +0000 (19:30 -0600)]
fix: remove ignored depr attribute which now errors
Caleb Cartwright [Fri, 6 Nov 2020 01:24:51 +0000 (19:24 -0600)]
fix: remove comment from cherry-pick that v1.x doesn't handle
Aaron Hill [Tue, 27 Oct 2020 22:52:02 +0000 (18:52 -0400)]
Don't flatten a block containing a single macro call
We no longer flatten a block that looks like this:
```rust
match val {
pat => { macro_call!() }
}
```
Currently, rust ignores trailing semicolons in macro expansion in
expression position (see https://github.com/rust-lang/rust/issues/33953)
If this is changed, flattening a block with a macro call may break the
user's code - the trailing semicolon will no longer parse if the macro
call occurs immediately on the right-hand side of the match arm
(e.g. `pat => macro_call!()`)
Caleb Cartwright [Fri, 30 Oct 2020 05:37:08 +0000 (00:37 -0500)]
meta: bump rustfmt version to 1.4.23