-
Notifications
You must be signed in to change notification settings - Fork 901
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
feat: conditionally allow unstable opts on stable/beta #4228
Changes from all commits
386d38a
d38f145
788eb5a
accbb87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,9 @@ impl ConfigCodeBlock { | |
|
||
fn get_block_config(&self) -> Config { | ||
let mut config = Config::default(); | ||
if !crate::is_nightly_channel!() { | ||
config.override_value("unstable_features", "true"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Figured this would be better than just disabling the cfg snippet tests outright on beta |
||
if self.config_name.is_some() && self.config_value.is_some() { | ||
config.override_value( | ||
self.config_name.as_ref().unwrap(), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -629,6 +629,10 @@ fn read_config(filename: &Path) -> (Config, OperationSetting, EmitterConfig) { | |
get_config(filename.with_extension("toml").file_name().map(Path::new)) | ||
}; | ||
|
||
if !config.was_set().unstable_features() && !is_nightly_channel!() { | ||
config.override_value("unstable_features", "true"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @topecongiro - know you've already approved the core changes here, but before I merge I want to make sure you are okay with this one check added here in 788eb5a to fix the tests on beta vs adding an inline There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that sounds way better to me. |
||
|
||
let mut operation_setting = OperationSetting::default(); | ||
let mut emitter_config = EmitterConfig::default(); | ||
for (key, val) in &sig_comments { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
unstable_features = true | ||
max_width = 100 | ||
comment_width = 80 | ||
tab_spaces = 2 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These three integration test jobs are failing since rustfmt 2.0 is removing existing trailing commas from empty match blocks after #4226, so adding these to the allowed failure list til after the 2.0 release and the formatting changes are applied upstream: