]> git.lizzy.rs Git - rust.git/commitdiff
Merge pull request #2191 from topecongiro/issue-2190
authorNick Cameron <nrc@ncameron.org>
Mon, 27 Nov 2017 05:14:08 +0000 (18:14 +1300)
committerGitHub <noreply@github.com>
Mon, 27 Nov 2017 05:14:08 +0000 (18:14 +1300)
Recover from failing to format variants even where there is no comment

33 files changed:
Configurations.md
src/config.rs
src/expr.rs
src/items.rs
tests/source/configs-empty_item_single_line-false.rs [new file with mode: 0644]
tests/source/configs-empty_item_single_line-true.rs [new file with mode: 0644]
tests/source/configs-fn_args_density-compressed_if_empty.rs [deleted file]
tests/source/configs-fn_empty_single_line-false.rs [deleted file]
tests/source/configs-fn_empty_single_line-true.rs [deleted file]
tests/source/configs-impl_empty_single_line-false.rs [deleted file]
tests/source/configs-impl_empty_single_line-true.rs [deleted file]
tests/source/configs-match_arm_blocks-false.rs [new file with mode: 0644]
tests/source/configs-match_arm_blocks-true.rs [new file with mode: 0644]
tests/source/configs-wrap_match_arms-false.rs [deleted file]
tests/source/configs-wrap_match_arms-true.rs [deleted file]
tests/source/issue-1127.rs
tests/source/match-nowrap-trailing-comma.rs
tests/source/match-nowrap.rs
tests/target/configs-control_style-rfc.rs
tests/target/configs-empty_item_single_line-false.rs [new file with mode: 0644]
tests/target/configs-empty_item_single_line-true.rs [new file with mode: 0644]
tests/target/configs-fn_args_density-compressed_if_empty.rs [deleted file]
tests/target/configs-fn_empty_single_line-false.rs [deleted file]
tests/target/configs-fn_empty_single_line-true.rs [deleted file]
tests/target/configs-impl_empty_single_line-false.rs [deleted file]
tests/target/configs-impl_empty_single_line-true.rs [deleted file]
tests/target/configs-match_arm_blocks-false.rs [new file with mode: 0644]
tests/target/configs-match_arm_blocks-true.rs [new file with mode: 0644]
tests/target/configs-wrap_match_arms-false.rs [deleted file]
tests/target/configs-wrap_match_arms-true.rs [deleted file]
tests/target/issue-1127.rs
tests/target/match-nowrap-trailing-comma.rs
tests/target/match-nowrap.rs

index 76589314e03c3d56a34af599688b8be63204b1b6..7726193fafe24c7ba6a644a9b283ce3445a988f7 100644 (file)
@@ -636,7 +636,7 @@ See also [`comment_width`](#comment_width).
 Argument density in functions
 
 - **Default value**: `"Tall"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
+- **Possible values**: `"Compressed"`, `"Tall"`, `"Vertical"`
 
 #### `"Tall"` (default):
 
@@ -696,35 +696,6 @@ trait Lorem {
 }
 ```
 
-#### `"CompressedIfEmpty"`:
-
-```rust
-trait Lorem {
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
-
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
-        // body
-    }
-
-    fn lorem(
-        ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: Consectetur,
-        adipiscing: Adipiscing, elit: Elit,
-    );
-
-    fn lorem(
-        ipsum: Ipsum,
-        dolor: Dolor,
-        sit: Sit,
-        amet: Amet,
-        consectetur: Consectetur,
-        adipiscing: Adipiscing,
-        elit: Elit,
-    ) {
-        // body
-    }
-}
-```
-
 #### `"Vertical"`:
 
 ```rust
@@ -874,10 +845,9 @@ struct Dolor<T>
 ```
 
 
+## `empty_item_single_line`
 
-## `fn_empty_single_line`
-
-Put empty-body functions on a single line
+Put empty-body functions and impls on a single line
 
 - **Default value**: `true`
 - **Possible values**: `true`, `false`
@@ -886,6 +856,8 @@ Put empty-body functions on a single line
 
 ```rust
 fn lorem() {}
+
+impl Lorem {}
 ```
 
 #### `false`:
@@ -893,9 +865,12 @@ fn lorem() {}
 ```rust
 fn lorem() {
 }
+
+impl Lorem {
+}
 ```
 
-See also [`control_brace_style`](#control_brace_style).
+See also [`brace_style`](#brace_style), [`control_brace_style`](#control_brace_style).
 
 
 ## `fn_single_line`
@@ -1004,28 +979,6 @@ fn lorem() -> usize {
 
 See also: [`tab_spaces`](#tab_spaces).
 
-## `impl_empty_single_line`
-
-Put empty-body implementations on a single line
-
-- **Default value**: `true`
-- **Possible values**: `true`, `false`
-
-#### `true` (default):
-
-```rust
-impl Lorem {}
-```
-
-#### `false`:
-
-```rust
-impl Lorem {
-}
-```
-
-See also [`brace_style`](#brace_style).
-
 
 ## `imports_indent`
 
@@ -1138,7 +1091,7 @@ match lorem {
 }
 ```
 
-See also: [`trailing_comma`](#trailing_comma), [`wrap_match_arms`](#wrap_match_arms).
+See also: [`trailing_comma`](#trailing_comma), [`match_arm_blocks`](#match_arm_blocks).
 
 ## `max_width`
 
@@ -1806,7 +1759,7 @@ Break comments to fit on the line
 // commodo consequat.
 ```
 
-## `wrap_match_arms`
+## `match_arm_blocks`
 
 Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
 
index c622522223102f277c7aa0fc8f71795467f6adc3..0f333337bf30e01715ee3e23741251f098a0f3a8 100644 (file)
@@ -77,8 +77,6 @@ pub enum $e {
     Compressed,
     // Use more lines.
     Tall,
-    // Try to compress if the body is empty.
-    CompressedIfEmpty,
     // Place every item on a separate line.
     Vertical,
 }
@@ -95,7 +93,7 @@ impl Density {
     pub fn to_list_tactic(self) -> ListTactic {
         match self {
             Density::Compressed => ListTactic::Mixed,
-            Density::Tall | Density::CompressedIfEmpty => ListTactic::HorizontalVertical,
+            Density::Tall => ListTactic::HorizontalVertical,
             Density::Vertical => ListTactic::Vertical,
         }
     }
@@ -599,10 +597,10 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
     normalize_comments: bool, false, true, "Convert /* */ comments to // comments where possible";
 
     // Single line expressions and items.
+    empty_item_single_line: bool, true, false,
+        "Put empty-body functions and impls on a single line";
     struct_lit_single_line: bool, true, false,
         "Put small struct literals on a single line";
-    impl_empty_single_line: bool, true, false, "Put empty-body implementations on a single line";
-    fn_empty_single_line: bool, true, false, "Put empty-body functions on a single line";
     fn_single_line: bool, false, false, "Put single-expression functions on a single line";
     where_single_line: bool, false, false, "To force single line where layout";
 
@@ -618,12 +616,6 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
     reorder_imported_names: bool, true, false,
         "Reorder lists of names in import statements alphabetically";
 
-    // Match
-    wrap_match_arms: bool, true, false, "Wrap the body of arms in blocks when it does not fit on \
-                                  the same line with the pattern of arms";
-    match_block_trailing_comma: bool, false, false,
-        "Put a trailing comma after a block based match arm (non-block arms are not affected)";
-
     // Spaces around punctuation
     binop_separator: SeparatorPlace, SeparatorPlace::Front, false,
         "Where to put a binary operator when a binary expression goes multiline.";
@@ -643,6 +635,8 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
         "Remove blank lines at start or end of a block";
     same_line_attributes: bool, true, false,
         "Try to put attributes on the same line as fields and variants.";
+    match_arm_blocks: bool, true, false, "Wrap the body of arms in blocks when it does not fit on \
+        the same line with the pattern of arms";
     force_multiline_blocks: bool, false, false,
         "Force multiline closure bodies and match arms to be wrapped in a block";
     fn_args_density: Density, Density::Tall, false, "Argument density in functions";
@@ -653,6 +647,8 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
         "How to handle trailing commas for lists";
     trailing_semicolon: bool, true, false,
         "Add trailing semicolon after break, continue and return";
+    match_block_trailing_comma: bool, false, false,
+        "Put a trailing comma after a block based match arm (non-block arms are not affected)";
 
     // Options that can change the source code beyond whitespace/blocks (somewhat linty things)
     merge_derives: bool, true, true, "Merge multiple `#[derive(...)]` into a single one";
index 9d29425a5ddc7fd914dab963b9a51c88b1dfa947..812ebd5cf3a264e634aea12c86391e23507be3c3 100644 (file)
@@ -1559,7 +1559,7 @@ fn rewrite_match_body(
 
         let indent_str = shape.indent.to_string(context.config);
         let nested_indent_str = next_line_indent.to_string(context.config);
-        let (body_prefix, body_suffix) = if context.config.wrap_match_arms() {
+        let (body_prefix, body_suffix) = if context.config.match_arm_blocks() {
             let comma = if context.config.match_block_trailing_comma() {
                 ","
             } else {
index 5ad260bec7ea164e732ffff78dbc5385b6df3e70..41c1b7981adad3fb88074e8834ac98861db9d846 100644 (file)
@@ -366,7 +366,7 @@ fn single_line_fn(&self, fn_str: &str, block: &ast::Block) -> Option<String> {
 
         let codemap = self.get_context().codemap;
 
-        if self.config.fn_empty_single_line() && is_empty_block(block, codemap)
+        if self.config.empty_item_single_line() && is_empty_block(block, codemap)
             && self.block_indent.width() + fn_str.len() + 2 <= self.config.max_width()
         {
             return Some(format!("{}{{}}", fn_str));
@@ -703,7 +703,7 @@ fn is_impl_single_line(
     let open_pos = snippet.find_uncommented("{")? + 1;
 
     Some(
-        context.config.impl_empty_single_line() && items.is_empty() && !result.contains('\n')
+        context.config.empty_item_single_line() && items.is_empty() && !result.contains('\n')
             && result.len() + where_clause_str.len() <= context.config.max_width()
             && !contains_comment(&snippet[open_pos..]),
     )
diff --git a/tests/source/configs-empty_item_single_line-false.rs b/tests/source/configs-empty_item_single_line-false.rs
new file mode 100644 (file)
index 0000000..8fa74f2
--- /dev/null
@@ -0,0 +1,17 @@
+// rustfmt-empty_item_single_line: false
+// Empty impl on single line
+
+impl Lorem {
+
+}
+
+impl Ipsum {
+
+}
+
+fn lorem() {
+}
+
+fn lorem() {
+
+}
diff --git a/tests/source/configs-empty_item_single_line-true.rs b/tests/source/configs-empty_item_single_line-true.rs
new file mode 100644 (file)
index 0000000..02e703d
--- /dev/null
@@ -0,0 +1,17 @@
+// rustfmt-empty_item_single_line: true
+// Empty impl on single line
+
+impl Lorem {
+
+}
+
+impl Ipsum {
+
+}
+
+fn lorem() {
+}
+
+fn lorem() {
+
+}
diff --git a/tests/source/configs-fn_args_density-compressed_if_empty.rs b/tests/source/configs-fn_args_density-compressed_if_empty.rs
deleted file mode 100644 (file)
index 3506ae8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// rustfmt-fn_args_density: CompressedIfEmpty
-// Function arguments density
-
-trait Lorem {
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
-
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
-        // body
-    }
-
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit);
-
-    // FIXME: Previous line should be formatted like this:
-    // fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
-    //          adipiscing: Adipiscing, elit: Elit);
-
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur, adipiscing: Adipiscing, elit: Elit) {
-        // body
-    }
-}
diff --git a/tests/source/configs-fn_empty_single_line-false.rs b/tests/source/configs-fn_empty_single_line-false.rs
deleted file mode 100644 (file)
index 86a279b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// rustfmt-fn_empty_single_line: false
-// Empty function on single line
-
-fn lorem() {
-}
-
-fn lorem() {
-
-}
diff --git a/tests/source/configs-fn_empty_single_line-true.rs b/tests/source/configs-fn_empty_single_line-true.rs
deleted file mode 100644 (file)
index 2603efd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// rustfmt-fn_empty_single_line: true
-// Empty function on single line
-
-fn lorem() {
-}
-
-fn lorem() {
-
-}
diff --git a/tests/source/configs-impl_empty_single_line-false.rs b/tests/source/configs-impl_empty_single_line-false.rs
deleted file mode 100644 (file)
index bdd114e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-impl_empty_single_line: false
-// Empty impl on single line
-
-impl Lorem {
-
-}
-
-impl Ipsum {
-
-}
diff --git a/tests/source/configs-impl_empty_single_line-true.rs b/tests/source/configs-impl_empty_single_line-true.rs
deleted file mode 100644 (file)
index 3b1f84f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-impl_empty_single_line: true
-// Empty impl on single line
-
-impl Lorem {
-
-}
-
-impl Ipsum {
-
-}
diff --git a/tests/source/configs-match_arm_blocks-false.rs b/tests/source/configs-match_arm_blocks-false.rs
new file mode 100644 (file)
index 0000000..53e37e1
--- /dev/null
@@ -0,0 +1,11 @@
+// rustfmt-match_arm_blocks: false
+// Wrap match-arms
+
+fn main() {
+    match lorem {
+        true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+        false => {
+            println!("{}", sit)
+        }
+    }
+}
diff --git a/tests/source/configs-match_arm_blocks-true.rs b/tests/source/configs-match_arm_blocks-true.rs
new file mode 100644 (file)
index 0000000..a452b13
--- /dev/null
@@ -0,0 +1,11 @@
+// rustfmt-match_arm_blocks: true
+// Wrap match-arms
+
+fn main() {
+    match lorem {
+        true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+        false => {
+            println!("{}", sit)
+        }
+    }
+}
diff --git a/tests/source/configs-wrap_match_arms-false.rs b/tests/source/configs-wrap_match_arms-false.rs
deleted file mode 100644 (file)
index d1c05c2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// rustfmt-wrap_match_arms: false
-// Wrap match-arms
-
-fn main() {
-    match lorem {
-        true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
-        false => {
-            println!("{}", sit)
-        }
-    }
-}
diff --git a/tests/source/configs-wrap_match_arms-true.rs b/tests/source/configs-wrap_match_arms-true.rs
deleted file mode 100644 (file)
index 8ddc5eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// rustfmt-wrap_match_arms: true
-// Wrap match-arms
-
-fn main() {
-    match lorem {
-        true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
-        false => {
-            println!("{}", sit)
-        }
-    }
-}
index 4820f5ea2295d84bdd2803c2989efe05036d6ea7..9996c194818796b74575018e80ab99373b9238ea 100644 (file)
@@ -1,5 +1,5 @@
 // rustfmt-max_width:120
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // rustfmt-match_block_trailing_comma: true
 
 fn a_very_very_very_very_very_very_very_very_very_very_very_long_function_name() -> i32 {
index f6e88406bb46218021697a58f52890032e9cf6ec..134d2fdf9a4a5bc1f1602936dee01335bb1f7164 100644 (file)
@@ -1,4 +1,4 @@
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // rustfmt-match_block_trailing_comma: true
 // Match expressions, no unwrapping of block arms or wrapping of multiline
 // expressions.
index 83e0fbbd4509b9b8442bed66e901faa0f6218b6c..db22cd9f010662002cfc5bf31f1f9663aa23d6ed 100644 (file)
@@ -1,4 +1,4 @@
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // Match expressions, no unwrapping of block arms or wrapping of multiline
 // expressions.
 
index 5e19681f90bbbceb909270bbdc917dcef4e08c02..6619d8b2630369ac8b6c325f821340116548bb7c 100644 (file)
@@ -26,7 +26,7 @@ fn issue1656() {
             match rewrite {
                 Some(ref body_str)
                     if (!body_str.contains('\n') && body_str.len() <= arm_shape.width)
-                        || !context.config.wrap_match_arms()
+                        || !context.config.match_arm_blocks()
                         || (extend && first_line_width(body_str) <= arm_shape.width)
                         || is_block =>
                 {
diff --git a/tests/target/configs-empty_item_single_line-false.rs b/tests/target/configs-empty_item_single_line-false.rs
new file mode 100644 (file)
index 0000000..b7886df
--- /dev/null
@@ -0,0 +1,15 @@
+// rustfmt-empty_item_single_line: false
+// Empty impl on single line
+
+impl Lorem {
+}
+
+impl Ipsum {
+}
+
+fn lorem() {
+}
+
+fn lorem() {
+
+}
diff --git a/tests/target/configs-empty_item_single_line-true.rs b/tests/target/configs-empty_item_single_line-true.rs
new file mode 100644 (file)
index 0000000..0755485
--- /dev/null
@@ -0,0 +1,10 @@
+// rustfmt-empty_item_single_line: true
+// Empty impl on single line
+
+impl Lorem {}
+
+impl Ipsum {}
+
+fn lorem() {}
+
+fn lorem() {}
diff --git a/tests/target/configs-fn_args_density-compressed_if_empty.rs b/tests/target/configs-fn_args_density-compressed_if_empty.rs
deleted file mode 100644 (file)
index 1a0f127..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// rustfmt-fn_args_density: CompressedIfEmpty
-// Function arguments density
-
-trait Lorem {
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet);
-
-    fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) {
-        // body
-    }
-
-    fn lorem(
-        ipsum: Ipsum,
-        dolor: Dolor,
-        sit: Sit,
-        amet: Amet,
-        consectetur: onsectetur,
-        adipiscing: Adipiscing,
-        elit: Elit,
-    );
-
-    // FIXME: Previous line should be formatted like this:
-    // fn lorem(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet, consectetur: onsectetur,
-    //          adipiscing: Adipiscing, elit: Elit);
-
-    fn lorem(
-        ipsum: Ipsum,
-        dolor: Dolor,
-        sit: Sit,
-        amet: Amet,
-        consectetur: onsectetur,
-        adipiscing: Adipiscing,
-        elit: Elit,
-    ) {
-        // body
-    }
-}
diff --git a/tests/target/configs-fn_empty_single_line-false.rs b/tests/target/configs-fn_empty_single_line-false.rs
deleted file mode 100644 (file)
index 86a279b..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// rustfmt-fn_empty_single_line: false
-// Empty function on single line
-
-fn lorem() {
-}
-
-fn lorem() {
-
-}
diff --git a/tests/target/configs-fn_empty_single_line-true.rs b/tests/target/configs-fn_empty_single_line-true.rs
deleted file mode 100644 (file)
index a54cd5e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// rustfmt-fn_empty_single_line: true
-// Empty function on single line
-
-fn lorem() {}
-
-fn lorem() {}
diff --git a/tests/target/configs-impl_empty_single_line-false.rs b/tests/target/configs-impl_empty_single_line-false.rs
deleted file mode 100644 (file)
index c8f97ef..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// rustfmt-impl_empty_single_line: false
-// Empty impl on single line
-
-impl Lorem {
-}
-
-impl Ipsum {
-}
diff --git a/tests/target/configs-impl_empty_single_line-true.rs b/tests/target/configs-impl_empty_single_line-true.rs
deleted file mode 100644 (file)
index 9a485d2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// rustfmt-impl_empty_single_line: true
-// Empty impl on single line
-
-impl Lorem {}
-
-impl Ipsum {}
diff --git a/tests/target/configs-match_arm_blocks-false.rs b/tests/target/configs-match_arm_blocks-false.rs
new file mode 100644 (file)
index 0000000..4d53a96
--- /dev/null
@@ -0,0 +1,10 @@
+// rustfmt-match_arm_blocks: false
+// Wrap match-arms
+
+fn main() {
+    match lorem {
+        true =>
+            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+        false => println!("{}", sit),
+    }
+}
diff --git a/tests/target/configs-match_arm_blocks-true.rs b/tests/target/configs-match_arm_blocks-true.rs
new file mode 100644 (file)
index 0000000..d75ef03
--- /dev/null
@@ -0,0 +1,11 @@
+// rustfmt-match_arm_blocks: true
+// Wrap match-arms
+
+fn main() {
+    match lorem {
+        true => {
+            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
+        }
+        false => println!("{}", sit),
+    }
+}
diff --git a/tests/target/configs-wrap_match_arms-false.rs b/tests/target/configs-wrap_match_arms-false.rs
deleted file mode 100644 (file)
index e4ca37b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-wrap_match_arms: false
-// Wrap match-arms
-
-fn main() {
-    match lorem {
-        true =>
-            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
-        false => println!("{}", sit),
-    }
-}
diff --git a/tests/target/configs-wrap_match_arms-true.rs b/tests/target/configs-wrap_match_arms-true.rs
deleted file mode 100644 (file)
index f6307e5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// rustfmt-wrap_match_arms: true
-// Wrap match-arms
-
-fn main() {
-    match lorem {
-        true => {
-            foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
-        }
-        false => println!("{}", sit),
-    }
-}
index afc79767cb794dd481064387250c4d64b678a48e..dbdd234b8e4bee96c4062e28f2f6af5e470bc551 100644 (file)
@@ -1,5 +1,5 @@
 // rustfmt-max_width:120
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // rustfmt-match_block_trailing_comma: true
 
 fn a_very_very_very_very_very_very_very_very_very_very_very_long_function_name() -> i32 {
index 0abc358a3405d541d3eb9c11d5ab7ac7bdaba0e4..19ef2144822a692727382dc9e49f7702f1aac26b 100644 (file)
@@ -1,4 +1,4 @@
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // rustfmt-match_block_trailing_comma: true
 // Match expressions, no unwrapping of block arms or wrapping of multiline
 // expressions.
index 1457109821880441e2c3ee1a747dbd4da0d9a0e8..9e674b1e2f5403eebb6273bab8bfb1d1cb9e61f1 100644 (file)
@@ -1,4 +1,4 @@
-// rustfmt-wrap_match_arms: false
+// rustfmt-match_arm_blocks: false
 // Match expressions, no unwrapping of block arms or wrapping of multiline
 // expressions.