Skip to content
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

rustfmt: drop nightly-gating of the --style-edition flag registration #135200

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Jan 7, 2025

Follow-up to Stabilize style_edition = "2024" in-tree #134929.

#134929 un-nightly-gated the read of --style-edition, but didn't also un-nightly-gate the registration/declaration of the --style-edition flag itself. Reading --style-edition on a non-nightly channel (e.g. beta) will thus panic because --style-edition is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this requires the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in #135197.

r? rustfmt

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2025

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@jieyouxu jieyouxu added the A-rustfmt Area: Rustfmt label Jan 7, 2025
@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 7, 2025

cc @ytmimi, since you reviewed the original PR: does this look right to you?

opts.optopt(
"",
"style-edition",
"The edition of the Style Guide.",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also dropped the (Unstable) in the description

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 7, 2025

Er, I guess this will have to be beta backported in order to unblock the beta release?

@ehuss
Copy link
Contributor

ehuss commented Jan 7, 2025

cc @compiler-errors

@compiler-errors
Copy link
Member

💀

@compiler-errors
Copy link
Member

Anyways, LGTM.

Copy link
Contributor

@ytmimi ytmimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me. Apologies for not catching this on the initial review.

@jieyouxu
Copy link
Member Author

jieyouxu commented Jan 7, 2025

It's very easy to miss :) No worries!
@bors r=ytmimi,compiler-errors rollup

@bors
Copy link
Contributor

bors commented Jan 7, 2025

📌 Commit b77eb96 has been approved by ytmimi,compiler-errors

It is now in the queue for this repository.

@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 Jan 7, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 7, 2025
…r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 7, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#131146 (Stop clearing box's drop flags early)
 - rust-lang#133810 (remove unnecessary `eval_verify_bound`)
 - rust-lang#134745 (Normalize each signature input/output in `typeck_with_fallback` with its own span)
 - rust-lang#134989 (Lower Guard Patterns to HIR.)
 - rust-lang#135149 (Use a post-monomorphization typing env when mangling components that come from impls)
 - rust-lang#135171 (rustdoc: use stable paths as preferred canonical paths)
 - rust-lang#135200 (rustfmt: drop nightly-gating of the `--style-edition` flag registration)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 7, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#133810 (remove unnecessary `eval_verify_bound`)
 - rust-lang#134745 (Normalize each signature input/output in `typeck_with_fallback` with its own span)
 - rust-lang#134989 (Lower Guard Patterns to HIR.)
 - rust-lang#135149 (Use a post-monomorphization typing env when mangling components that come from impls)
 - rust-lang#135171 (rustdoc: use stable paths as preferred canonical paths)
 - rust-lang#135200 (rustfmt: drop nightly-gating of the `--style-edition` flag registration)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 8, 2025
Rollup merge of rust-lang#135200 - jieyouxu:stabilize-style-edition, r=ytmimi,compiler-errors

rustfmt: drop nightly-gating of the `--style-edition` flag registration

Follow-up to [Stabilize `style_edition = "2024"` in-tree rust-lang#134929](rust-lang#134929).

rust-lang#134929 un-nightly-gated the *read* of `--style-edition`, but didn't also un-nightly-gate the *registration*/*declaration* of the `--style-edition` flag itself. Reading `--style-edition` on a non-nightly channel (e.g. beta) will thus panic because `--style-edition` is never declared.

This PR also un-nightly-gates the registration. Not sure how to write a regression test for this, because this *requires* the non-nightly / beta channel. Though existing tests do fail (albeit indirectly).

Checking if this fixes the panic against beta in rust-lang#135197.

r? rustfmt
@bors bors merged commit 5dd21df into rust-lang:master Jan 8, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 8, 2025
@jieyouxu jieyouxu deleted the stabilize-style-edition branch January 8, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustfmt Area: Rustfmt 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.

7 participants