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.
Resolves #2183. I saw these again the other day when I was in the config module and decided to take a closer look at them.
CFG_RELEASE_CHANNEL
is now checked at compile time, so the original issue with sequencing of tests that were mutating the shared env vars during test exection is no longer relevant.rustfmt/rustfmt-core/rustfmt-config/src/config_type.rs
Lines 338 to 342 in 9124dd8
Instead, I split out the tests for nightly vs. non-nightly with their respective assertions accordingly, and the latter set of tests will run as part of one of the CI jobs (ex: https://travis-ci.com/rust-lang/rustfmt/jobs/291200498).
All that being said.. 😄
@topecongiro in #3387 (comment) you mentioned removing
unstable_features
altogether as part of 2.0, so would you rather I go ahead and just remove theunstable_features
config option (and related content like the original commented out tests) altogether?Happy to do so if that's the plan, though based on the thread in #3387 it seems like users would be interested in having the ability to opt-in to being able to use non-stablized rustfmt config options even on stable (not available today). FWIW I can understand that request, and I believe
libtest
supportssomething similar today:
This will fail (
json
format is unstable)but this works