Skip to content

sync rustfmt subtree #90680

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Nov 8, 2021
Merged

sync rustfmt subtree #90680

merged 29 commits into from
Nov 8, 2021

Conversation

calebcartwright
Copy link
Member

No description provided.

calebcartwright and others added 29 commits October 20, 2021 00:11
* Add Together option to group_imports

* Rename option to One

* Rename files from Together to One
Resolves 5038

rust-lang/rust builds now document rustfmt (rust-lang#87119). The
build process is updated with doc checks to ensure that rustfmt doesn't
introduce warnings.

Warnings are treated as hard errors in rust-lang/rust and won't show
until bors tests the changes (refs rust-lang#90087).
Resolves 5033

Trailing comments at the end of the root Module were removed because the
module span did not extend until the end of the file.

The root Module's span now encompasses the entire file, which ensures
that no comments are lost when using ``#![rustfmt::skip]``
* Document RUSTFMT env var

* Move documentation up

* Apply suggestions from code review

Co-authored-by: Caleb Cartwright <[email protected]>

* Fix accedental removal

Co-authored-by: Caleb Cartwright <[email protected]>
# Conflicts:
#	README.md
resolves 5012
resolves 4850

This behavior was noticed when using the ``trailing_comma = "Never"``
configuration option (5012).

This behavior was also noticed when using default configurations (4850).

rustfmt would add a trailing space to where clause bounds that had an
empty right hand side.

Now no trailing space is added to the end of these where clause bounds.
TraitKind -> Trait
TyAliasKind -> TyAlias
ImplKind -> Impl
FnKind -> Fn

All `*Kind`s in AST are supposed to be enums.

Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order.

Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
@rust-highfive
Copy link
Contributor

Some changes occurred in src/tools/rustfmt.

cc @calebcartwright

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 8, 2021
@calebcartwright
Copy link
Member Author

This diff had merge conflicts on both sides of the sync, and there's a reasonable chance of more if this sits for too long which would require starting the sync over given the inability to rebase with subtrees

@bors r+ p=1

@bors
Copy link
Collaborator

bors commented Nov 8, 2021

📌 Commit 30fb124 has been approved by calebcartwright

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 8, 2021
@bors
Copy link
Collaborator

bors commented Nov 8, 2021

⌛ Testing commit 30fb124 with merge b307481...

@bors
Copy link
Collaborator

bors commented Nov 8, 2021

☀️ Test successful - checks-actions
Approved by: calebcartwright
Pushing b307481 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 8, 2021
@bors bors merged commit b307481 into rust-lang:master Nov 8, 2021
@rustbot rustbot added this to the 1.58.0 milestone Nov 8, 2021
@calebcartwright calebcartwright deleted the rustfmt-sync branch November 8, 2021 13:53
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b307481): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.