Add cfg_select! formatting rules to the style guide - #160967
Open
traviscross wants to merge 1 commit into
Open
Conversation
We stabilized `cfg_select!` in Rust 1.95 but haven't yet stabilized formatting support. Let's add formatting rules for it to the style guide.
Collaborator
|
Some changes occurred in src/doc/style-guide cc @rust-lang/style |
Collaborator
|
|
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 13, 2026
…matting, r=jieyouxu rustfmt: restrict `cfg_select!` formatting to the `nightly` release channel Closes: rust-lang#160944 `cfg_select!` formatting was implemented in rust-lang#154202. The formatting diverged from what was outlined in the original Style FCP (rust-lang/style-team#201 (comment) and rust-lang#144323 (comment)). Since the 1.99 beta is scheduled to branch from main on August 14 I want to get this nightly formatting gate out so that we can correct the formatting issues before we promote the formatting to the beta / stable release channels. Style Guide PR: rust-lang#160967 r? @jieyouxu cc: @traviscross
rust-timer
added a commit
that referenced
this pull request
Aug 13, 2026
Rollup merge of #160998 - ytmimi:nightly_only_cfg_select_formatting, r=jieyouxu rustfmt: restrict `cfg_select!` formatting to the `nightly` release channel Closes: #160944 `cfg_select!` formatting was implemented in #154202. The formatting diverged from what was outlined in the original Style FCP (rust-lang/style-team#201 (comment) and #144323 (comment)). Since the 1.99 beta is scheduled to branch from main on August 14 I want to get this nightly formatting gate out so that we can correct the formatting issues before we promote the formatting to the beta / stable release channels. Style Guide PR: #160967 r? @jieyouxu cc: @traviscross
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We stabilized
cfg_select!in Rust 1.95 but haven't yet stabilized formatting support. Let's add formatting rules for it to the style guide.Our original FCP was in rust-lang/style-team#201 (comment) inclusive of #144323 (comment).
This PR extends those decisions with handling of more edge cases.
See also:
rustfmtformatting ofcfg_select!pending for Rust 1.99 diverges from style FCP #160944r? @joshtriplett
cc @rust-lang/style @rust-lang/rustfmt