Skip to content

Commit

Permalink
feat: stabilize disable_all_formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Oct 14, 2021
1 parent f2fb3c9 commit c9c1932
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
5 changes: 0 additions & 5 deletions src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit c9c1932

Please sign in to comment.