From c9c1932be3299b40eab63106deeb5d5ad2283b61 Mon Sep 17 00:00:00 2001 From: Caleb Cartwright Date: Wed, 13 Oct 2021 21:22:34 -0500 Subject: [PATCH] feat: stabilize disable_all_formatting --- Configurations.md | 6 ++++-- src/config/mod.rs | 2 +- src/test/mod.rs | 5 ----- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Configurations.md b/Configurations.md index 06db897a42e..7a77dbe154b 100644 --- a/Configurations.md +++ b/Configurations.md @@ -521,11 +521,13 @@ fn main() { ## `disable_all_formatting` -Don't reformat anything +Don't reformat anything. + +Note that this option may be soft-deprecated in the future once the [ignore](#ignore) option is stabilized. Nightly toolchain users are encouraged to use [ignore](#ignore) instead when possible. - **Default value**: `false` - **Possible values**: `true`, `false` -- **Stable**: No (tracking issue: #3388) +- **Stable**: Yes ## `edition` diff --git a/src/config/mod.rs b/src/config/mod.rs index 398a1814d8d..c5419d860c9 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -155,7 +155,7 @@ create_config! { "Require a specific version of rustfmt"; unstable_features: bool, false, false, "Enables unstable features. Only available on nightly channel"; - disable_all_formatting: bool, false, false, "Don't reformat anything"; + disable_all_formatting: bool, false, true, "Don't reformat anything"; skip_children: bool, false, false, "Don't reformat out of line modules"; hide_parse_errors: bool, false, false, "Hide errors from the parser"; error_on_line_overflow: bool, false, false, "Error if unable to get all lines within max_width"; diff --git a/src/test/mod.rs b/src/test/mod.rs index ece1b91bfd7..48d61289a9b 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -469,11 +469,6 @@ fn stdin_works_with_modified_lines() { #[test] fn stdin_disable_all_formatting_test() { init_log(); - match option_env!("CFG_RELEASE_CHANNEL") { - None | Some("nightly") => {} - // These tests require nightly. - _ => return, - } let input = String::from("fn main() { println!(\"This should not be formatted.\"); }"); let mut child = Command::new(rustfmt().to_str().unwrap()) .stdin(Stdio::piped())