feature: Allow user's to set the release channel when running the diff check - #7080
Merged
jieyouxu merged 2 commits intoAug 28, 2026
Merged
Conversation
Now we can configure which release channel the compiled rustfmt should target. Because `CFG_RELEASE_CHANNEL` wasn't getting set before we'd default to the `nightly` channel. For the most part that's not really an issue, but because we're using the diff check to ensure that we're not changing stable formatting it's more appropriate to default builds to the `stable` release channel.
…_diff.yml The `release_channel` defaults to `stable`, but it might be nice in some cases to test different release channels.
ytmimi
force-pushed
the
cfg_release_channel_on_diff_check
branch
from
August 28, 2026 04:10
ba3031d to
7376a6a
Compare
jieyouxu
approved these changes
Aug 28, 2026
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.
The diff check failed on the latest subtree push (#7079) because of
cfg_select!formatting that was implemented in r-l/r (rust-lang/rust#154202) even though we gatedcfg_select!formatting on thenightlyrelease channel (rust-lang/rust#160998). In theory the diff-check should have succeeded because r-l/rustfmt didn't have its owncfg_select!formatting implementation yet.What I realized is that we're not setting
CFG_RELEASE_CHANNELso rustfmt defaults to thenightlyrelease channel. with these changes we'll have more control over the release channel and we'll defaultCFG_RELEASE_CHANNEL=stablesince the primary goal of the Diff Check is to ensure we're not breaking stable formatting.