Introduce required language_edition and style_edition inputs for Diff Check
#6742
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.
So that when manually dispatching the Diff Check workflow, an explicit pair of {language edition, style edition} are specified.
rustfmtwill default to Edition 2015 likerustc, which can cause a lot of parse errors in the current set of candidate projects used for comparingrustfmtbehaviors since they tend to be on Edition 2024.rustfmtcan pick a lower default style edition than the actual language edition, which can also lead to unexpected diff check outcomes.Note that the language/style editions specified with
language_edition/style_editioninputs can still be overridden byrustfmt_configs, but the intention is to make sure thelanguage_edition/style_editionare always specified.Context: #6681 (comment)
Separate
--edition/--style-editionvs--config=edition=...,style_edition=...See discussion in #t-rustfmt > style edition flag vs config.
In this PR I use the
--config=style_edition=$STYLE_EDITIONform, because I'm not actually sure what's the precedence order of mixed invocations (example below), so I just used--config=style_edition=$STYLE_EDITIONwhere laterstyle_editionsspecified in optionalrustfmt_configsshould take precedence over this input.Review remarks
The first commit in this PR is a drive-by fix for
rusfmt->rustfmtthat was bothering me, should not contain any functional changes.The following commits are the actual script/workflow changes.