feat: stabilize disable_all_formatting
This commit is contained in:
parent
f2fb3c9659
commit
c9c1932be3
@ -521,11 +521,13 @@ fn main() {
|
|||||||
|
|
||||||
## `disable_all_formatting`
|
## `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`
|
- **Default value**: `false`
|
||||||
- **Possible values**: `true`, `false`
|
- **Possible values**: `true`, `false`
|
||||||
- **Stable**: No (tracking issue: #3388)
|
- **Stable**: Yes
|
||||||
|
|
||||||
## `edition`
|
## `edition`
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ create_config! {
|
|||||||
"Require a specific version of rustfmt";
|
"Require a specific version of rustfmt";
|
||||||
unstable_features: bool, false, false,
|
unstable_features: bool, false, false,
|
||||||
"Enables unstable features. Only available on nightly channel";
|
"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";
|
skip_children: bool, false, false, "Don't reformat out of line modules";
|
||||||
hide_parse_errors: bool, false, false, "Hide errors from the parser";
|
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";
|
error_on_line_overflow: bool, false, false, "Error if unable to get all lines within max_width";
|
||||||
|
@ -469,11 +469,6 @@ fn stdin_works_with_modified_lines() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn stdin_disable_all_formatting_test() {
|
fn stdin_disable_all_formatting_test() {
|
||||||
init_log();
|
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 input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
|
||||||
let mut child = Command::new(rustfmt().to_str().unwrap())
|
let mut child = Command::new(rustfmt().to_str().unwrap())
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user