Skip to content

Commit c9c1932

Browse files
feat: stabilize disable_all_formatting
1 parent f2fb3c9 commit c9c1932

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Diff for: Configurations.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,13 @@ fn main() {
521521

522522
## `disable_all_formatting`
523523

524-
Don't reformat anything
524+
Don't reformat anything.
525+
526+
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.
525527

526528
- **Default value**: `false`
527529
- **Possible values**: `true`, `false`
528-
- **Stable**: No (tracking issue: #3388)
530+
- **Stable**: Yes
529531

530532
## `edition`
531533

Diff for: src/config/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ create_config! {
155155
"Require a specific version of rustfmt";
156156
unstable_features: bool, false, false,
157157
"Enables unstable features. Only available on nightly channel";
158-
disable_all_formatting: bool, false, false, "Don't reformat anything";
158+
disable_all_formatting: bool, false, true, "Don't reformat anything";
159159
skip_children: bool, false, false, "Don't reformat out of line modules";
160160
hide_parse_errors: bool, false, false, "Hide errors from the parser";
161161
error_on_line_overflow: bool, false, false, "Error if unable to get all lines within max_width";

Diff for: src/test/mod.rs

-5
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,6 @@ fn stdin_works_with_modified_lines() {
469469
#[test]
470470
fn stdin_disable_all_formatting_test() {
471471
init_log();
472-
match option_env!("CFG_RELEASE_CHANNEL") {
473-
None | Some("nightly") => {}
474-
// These tests require nightly.
475-
_ => return,
476-
}
477472
let input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
478473
let mut child = Command::new(rustfmt().to_str().unwrap())
479474
.stdin(Stdio::piped())

0 commit comments

Comments
 (0)