]> git.lizzy.rs Git - rust.git/commitdiff
Remove `where_density` and `where_layout` options
authorNick Cameron <ncameron@mozilla.com>
Fri, 24 Nov 2017 08:08:24 +0000 (21:08 +1300)
committerNick Cameron <ncameron@mozilla.com>
Fri, 24 Nov 2017 08:08:24 +0000 (21:08 +1300)
There is a choice between block and visual indent for where clauses, plus the
single line option. I think these two are too fine-grained to be useful.

26 files changed:
Configurations.md
src/config.rs
src/items.rs
tests/config/small_tabs.toml
tests/source/configs-where_density-compressed.rs [deleted file]
tests/source/configs-where_density-compressed_if_empty.rs [deleted file]
tests/source/configs-where_density-tall.rs [deleted file]
tests/source/configs-where_density-vertical.rs [deleted file]
tests/source/configs-where_layout-horizontal.rs [deleted file]
tests/source/configs-where_layout-horizontal_vertical.rs [deleted file]
tests/source/configs-where_layout-mixed.rs [deleted file]
tests/source/configs-where_layout-vertical.rs [deleted file]
tests/source/fn-custom-2.rs
tests/source/fn-custom-3.rs
tests/source/fn-custom-4.rs
tests/target/configs-where_density-compressed.rs [deleted file]
tests/target/configs-where_density-compressed_if_empty.rs [deleted file]
tests/target/configs-where_density-tall.rs [deleted file]
tests/target/configs-where_density-vertical.rs [deleted file]
tests/target/configs-where_layout-horizontal.rs [deleted file]
tests/target/configs-where_layout-horizontal_vertical.rs [deleted file]
tests/target/configs-where_layout-mixed.rs [deleted file]
tests/target/configs-where_layout-vertical.rs [deleted file]
tests/target/fn-custom-2.rs
tests/target/fn-custom-3.rs
tests/target/fn-custom-4.rs

index 968b5a2d634950a228420b5c73abcc14827365c3..498cf76eafee1fca0d28710e32e53a3b1e58839a 100644 (file)
@@ -241,8 +241,6 @@ fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
 }
 ```
 
-See also: [`where_density`](#where_density), [`where_layout`](#where_layout).
-
 
 ## `same_line_attributes`
 
@@ -1869,163 +1867,6 @@ let lorem = try!(ipsum.map(|dolor|dolor.sit()));
 let lorem = ipsum.map(|dolor| dolor.sit())?;
 ```
 
-## `where_density`
-
-Density of a where clause.
-
-- **Default value**: `"Vertical"`
-- **Possible values**: `"Compressed"`, `"CompressedIfEmpty"`, `"Tall"`, `"Vertical"`
-
-#### `"Vertical"` (default):
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
-```
-
-**Note:** `where_density = "Vertical"` currently produces the same output as `where_density = "Tall"`.
-
-#### `"CompressedIfEmpty"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
-```
-
-#### `"Compressed"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq {
-        // body
-    }
-}
-```
-
-#### `"Tall"`:
-
-```rust
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
-```
-
-**Note:** `where_density = "Tall"` currently produces the same output as `where_density = "Vertical"`.
-
-See also: [`where_layout`](#where_layout), [`indent_style`](#indent_style).
-
-## `where_layout`
-
-Element layout inside a where clause
-
-- **Default value**: `"Vertical"`
-- **Possible values**: `"Horizontal"`, `"HorizontalVertical"`, `"Mixed"`, `"Vertical"`
-
-#### `"Vertical"` (default):
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"Horizontal"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"HorizontalVertical"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet,
-          Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing,
-          Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-#### `"Mixed"`:
-
-```rust
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-    where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur,
-          Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit
-{
-    // body
-}
-```
-
-See also: [`where_density`](#where_density), [`indent_style`](#indent_style).
 
 ## `wrap_comments`
 
index 22c6cd6121d587a53ae1282a7178707575766cd9..808cde0e38201d10ad8c82a7b378ca79d137ceb0 100644 (file)
@@ -604,15 +604,7 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
     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 clauses
-    // TODO:
-    // 1. Should we at least try to put the where clause on the same line as the rest of the
-    // function decl?
-    // 2. Currently options `Tall` and `Vertical` produce the same output.
-    where_density: Density, Density::Vertical, false, "Density of a where clause";
     where_single_line: bool, false, false, "To force single line where layout";
-    where_layout: ListTactic, ListTactic::Vertical, false, "Element layout inside a where clause";
 
     // Imports
     imports_indent: IndentStyle, IndentStyle::Visual, false, "Indent of imports";
index 695ee71f0c3a77388f7b0d834b4a03b10ad4bbdd..d1dd61bbc1c4465b835f6ba1a48bcff3ecd4279a 100644 (file)
@@ -302,10 +302,7 @@ pub fn rewrite_fn(
     ) -> Option<String> {
         let context = self.get_context();
 
-        let has_body =
-            !is_empty_block(block, self.codemap) || !context.config.fn_empty_single_line();
-        let mut newline_brace =
-            newline_for_brace(self.config, &fn_sig.generics.where_clause, has_body);
+        let mut newline_brace = newline_for_brace(self.config, &fn_sig.generics.where_clause);
 
         let (mut result, force_newline_brace) =
             rewrite_fn_base(&context, indent, ident, fn_sig, span, newline_brace, true)?;
@@ -604,7 +601,7 @@ pub fn format_impl(
             &generics.where_clause,
             context.config.brace_style(),
             Shape::legacy(where_budget, offset.block_only()),
-            context.config.where_density(),
+            Density::Vertical,
             "{",
             where_span_end,
             self_ty.span.hi(),
@@ -978,18 +975,12 @@ pub fn format_trait(context: &RewriteContext, item: &ast::Item, offset: Indent)
         }
         result.push_str(&trait_bound_str);
 
-        let has_body = !trait_items.is_empty();
-
-        let where_density = if (context.config.where_density() == Density::Compressed
-            && (!result.contains('\n') || context.config.indent_style() == IndentStyle::Block))
-            || (context.config.indent_style() == IndentStyle::Block && result.is_empty())
-            || (context.config.where_density() == Density::CompressedIfEmpty && !has_body
-                && !result.contains('\n'))
-        {
-            Density::Compressed
-        } else {
-            Density::Tall
-        };
+        let where_density =
+            if context.config.indent_style() == IndentStyle::Block && result.is_empty() {
+                Density::Compressed
+            } else {
+                Density::Tall
+            };
 
         let where_budget = context.budget(last_line_width(&result));
         let pos_before_where = if type_param_bounds.is_empty() {
@@ -1373,7 +1364,7 @@ pub fn rewrite_type_alias(
         &generics.where_clause,
         context.config.brace_style(),
         Shape::legacy(where_budget, indent),
-        context.config.where_density(),
+        Density::Vertical,
         "=",
         Some(span.hi()),
         generics.span.hi(),
@@ -2027,12 +2018,6 @@ fn rewrite_fn_base(
         }
     }
 
-    let should_compress_where = match context.config.where_density() {
-        Density::Compressed => !result.contains('\n'),
-        Density::CompressedIfEmpty => !has_body && !result.contains('\n'),
-        _ => false,
-    };
-
     let pos_before_where = match fd.output {
         ast::FunctionRetTy::Default(..) => args_span.hi(),
         ast::FunctionRetTy::Ty(ref ty) => ty.span.hi(),
@@ -2040,26 +2025,6 @@ fn rewrite_fn_base(
 
     let is_args_multi_lined = arg_str.contains('\n');
 
-    if where_clause.predicates.len() == 1 && should_compress_where {
-        let budget = context.budget(last_line_used_width(&result, indent.width()));
-        if let Some(where_clause_str) = rewrite_where_clause(
-            context,
-            where_clause,
-            context.config.brace_style(),
-            Shape::legacy(budget, indent),
-            Density::Compressed,
-            "{",
-            Some(span.hi()),
-            pos_before_where,
-            WhereClauseOption::compressed(),
-            is_args_multi_lined,
-        ) {
-            result.push_str(&where_clause_str);
-            force_new_line_for_brace |= last_line_contains_single_line_comment(&result);
-            return Some((result, force_new_line_for_brace));
-        }
-    }
-
     let option = WhereClauseOption::new(!has_body, put_args_in_block && ret_str.is_empty());
     let where_clause_str = rewrite_where_clause(
         context,
@@ -2115,14 +2080,6 @@ pub fn new(suppress_comma: bool, snuggle: bool) -> WhereClauseOption {
         }
     }
 
-    pub fn compressed() -> WhereClauseOption {
-        WhereClauseOption {
-            suppress_comma: true,
-            snuggle: false,
-            compress_where: true,
-        }
-    }
-
     pub fn snuggled(current: &str) -> WhereClauseOption {
         WhereClauseOption {
             suppress_comma: false,
@@ -2355,19 +2312,16 @@ fn compute_budgets_for_args(
     Some((0, context.budget(used_space), new_indent))
 }
 
-fn newline_for_brace(config: &Config, where_clause: &ast::WhereClause, has_body: bool) -> bool {
+fn newline_for_brace(config: &Config, where_clause: &ast::WhereClause) -> bool {
     let predicate_count = where_clause.predicates.len();
 
     if config.where_single_line() && predicate_count == 1 {
         return false;
     }
-    match (config.brace_style(), config.where_density()) {
-        (BraceStyle::AlwaysNextLine, _) => true,
-        (_, Density::Compressed) if predicate_count == 1 => false,
-        (_, Density::CompressedIfEmpty) if predicate_count == 1 && !has_body => false,
-        (BraceStyle::SameLineWhere, _) if predicate_count > 0 => true,
-        _ => false,
-    }
+    let brace_style = config.brace_style();
+
+    brace_style == BraceStyle::AlwaysNextLine
+        || (brace_style == BraceStyle::SameLineWhere && predicate_count > 0)
 }
 
 fn rewrite_generics(
@@ -2694,14 +2648,8 @@ fn rewrite_where_clause(
         false,
     );
     let item_vec = items.collect::<Vec<_>>();
-    // FIXME: we don't need to collect here if the where_layout isn't
-    // HorizontalVertical.
-    let tactic = definitive_tactic(
-        &item_vec,
-        context.config.where_layout(),
-        Separator::Comma,
-        budget,
-    );
+    // FIXME: we don't need to collect here
+    let tactic = definitive_tactic(&item_vec, ListTactic::Vertical, Separator::Comma, budget);
 
     let mut comma_tactic = context.config.trailing_comma();
     // Kind of a hack because we don't usually have trailing commas in where clauses.
index 472df014435c373d8cfc1085ee4e2d763757dc54..d03ac281acb03fe5a6dac454d00e63a9beae6fee 100644 (file)
@@ -4,8 +4,6 @@ tab_spaces = 2
 newline_style = "Unix"
 brace_style = "SameLineWhere"
 fn_args_density = "Tall"
-where_density = "Tall"
-where_layout = "Vertical"
 trailing_comma = "Vertical"
 indent_style = "Block"
 report_todo = "Always"
diff --git a/tests/source/configs-where_density-compressed.rs b/tests/source/configs-where_density-compressed.rs
deleted file mode 100644 (file)
index d10c860..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_density: Compressed
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
-        // body
-    }
-}
diff --git a/tests/source/configs-where_density-compressed_if_empty.rs b/tests/source/configs-where_density-compressed_if_empty.rs
deleted file mode 100644 (file)
index 1d234a4..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_density: CompressedIfEmpty
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
-        // body
-    }
-}
diff --git a/tests/source/configs-where_density-tall.rs b/tests/source/configs-where_density-tall.rs
deleted file mode 100644 (file)
index bf40471..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_density: Tall
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
-        // body
-    }
-}
diff --git a/tests/source/configs-where_density-vertical.rs b/tests/source/configs-where_density-vertical.rs
deleted file mode 100644 (file)
index dd4e1da..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_density: Vertical
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit where Dolor: Eq {
-        // body
-    }
-}
diff --git a/tests/source/configs-where_layout-horizontal.rs b/tests/source/configs-where_layout-horizontal.rs
deleted file mode 100644 (file)
index 0d676b7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-// rustfmt-where_layout: Horizontal
-// rustfmt-error_on_line_overflow: false
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur {
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit {
-    // body
-}
diff --git a/tests/source/configs-where_layout-horizontal_vertical.rs b/tests/source/configs-where_layout-horizontal_vertical.rs
deleted file mode 100644 (file)
index dd389db..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_layout: HorizontalVertical
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur {
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit {
-    // body
-}
diff --git a/tests/source/configs-where_layout-mixed.rs b/tests/source/configs-where_layout-mixed.rs
deleted file mode 100644 (file)
index c3b78b2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_layout: Mixed
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur {
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit {
-    // body
-}
diff --git a/tests/source/configs-where_layout-vertical.rs b/tests/source/configs-where_layout-vertical.rs
deleted file mode 100644 (file)
index 76f2ed0..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-// rustfmt-where_layout: Vertical
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur {
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet) where Ipsum: IpsumDolorSitAmet, Dolor: DolorSitAmetConsectetur, Sit: SitAmetConsecteturAdipiscing, Amet: AmetConsecteturAdipiscingElit {
-    // body
-}
index 4fb427a1b1ff8e2161dfcbd8ac410912f6fa182d..72d841544a8d9bb32f6b5483ddb4265cf9cdf226 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_layout: Mixed
 // Test different indents.
 
 fn foo(a: Aaaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbbbb, c: Ccccccccccccccccc, d: Ddddddddddddddddddddddddd, e: Eeeeeeeeeeeeeeeeeee) {
index efaf559c9daa79b988de3e09a99c52af78cc405d..9934fb61efdac96dd3e145926312a5450610aed5 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_layout: HorizontalVertical
 // Test different indents.
 
 fn foo(a: Aaaaaaaaaaaaaaa, b: Bbbbbbbbbbbbbbbb, c: Ccccccccccccccccc, d: Ddddddddddddddddddddddddd, e: Eeeeeeeeeeeeeeeeeee) {
index 668cdce382d38a264134789295710f377ca1ffd3..01c00aecb8681153e4a917a069d8dfd7824014ec 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_density: Compressed
 // Test different indents.
 
 fn qux() where X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT, X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT, X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT, X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT {
diff --git a/tests/target/configs-where_density-compressed.rs b/tests/target/configs-where_density-compressed.rs
deleted file mode 100644 (file)
index deddbee..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// rustfmt-where_density: Compressed
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq {
-        // body
-    }
-}
diff --git a/tests/target/configs-where_density-compressed_if_empty.rs b/tests/target/configs-where_density-compressed_if_empty.rs
deleted file mode 100644 (file)
index 45f22eb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// rustfmt-where_density: CompressedIfEmpty
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
diff --git a/tests/target/configs-where_density-tall.rs b/tests/target/configs-where_density-tall.rs
deleted file mode 100644 (file)
index e256f1c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// rustfmt-where_density: Tall
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
diff --git a/tests/target/configs-where_density-vertical.rs b/tests/target/configs-where_density-vertical.rs
deleted file mode 100644 (file)
index 96ac111..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// rustfmt-where_density: Vertical
-// Where density
-
-trait Lorem {
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq;
-
-    fn ipsum<Dolor>(dolor: Dolor) -> Sit
-    where
-        Dolor: Eq,
-    {
-        // body
-    }
-}
diff --git a/tests/target/configs-where_layout-horizontal.rs b/tests/target/configs-where_layout-horizontal.rs
deleted file mode 100644 (file)
index 062f62f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// rustfmt-where_layout: Horizontal
-// rustfmt-error_on_line_overflow: false
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-    Sit: SitAmetConsecteturAdipiscing,
-    Amet: AmetConsecteturAdipiscingElit,
-{
-    // body
-}
diff --git a/tests/target/configs-where_layout-horizontal_vertical.rs b/tests/target/configs-where_layout-horizontal_vertical.rs
deleted file mode 100644 (file)
index 56d125e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// rustfmt-where_layout: HorizontalVertical
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-    Sit: SitAmetConsecteturAdipiscing,
-    Amet: AmetConsecteturAdipiscingElit,
-{
-    // body
-}
diff --git a/tests/target/configs-where_layout-mixed.rs b/tests/target/configs-where_layout-mixed.rs
deleted file mode 100644 (file)
index fa896b7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// rustfmt-where_layout: Mixed
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-    Sit: SitAmetConsecteturAdipiscing,
-    Amet: AmetConsecteturAdipiscingElit,
-{
-    // body
-}
diff --git a/tests/target/configs-where_layout-vertical.rs b/tests/target/configs-where_layout-vertical.rs
deleted file mode 100644 (file)
index 024a74d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// rustfmt-where_layout: Vertical
-// Where layout
-
-fn lorem<Ipsum, Dolor>(ipsum: Ipsum, dolor: Dolor)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-{
-    // body
-}
-
-fn lorem<Ipsum, Dolor, Sit, Amet>(ipsum: Ipsum, dolor: Dolor, sit: Sit, amet: Amet)
-where
-    Ipsum: IpsumDolorSitAmet,
-    Dolor: DolorSitAmetConsectetur,
-    Sit: SitAmetConsecteturAdipiscing,
-    Amet: AmetConsecteturAdipiscingElit,
-{
-    // body
-}
index bf528989fd42144ac13a96fdb2b0d903d2a289a4..c2b3580c668c8b0aa2b019fc67ddb12a7d793ad0 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_layout: Mixed
 // Test different indents.
 
 fn foo(
index 6561140196b1255a3083c6380d6cf7ed778bb0de..baa1e39231bd67ae8904f53e2adb248f269e4b1b 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_layout: HorizontalVertical
 // Test different indents.
 
 fn foo(
index 35895f386d0d6ae942bdb8da825101e120f871c5..0a223ef5fac9d319547ccc33d5b71eb414ee7a32 100644 (file)
@@ -1,5 +1,4 @@
 // rustfmt-indent_style: Block
-// rustfmt-where_density: Compressed
 // Test different indents.
 
 fn qux()
@@ -13,7 +12,9 @@ fn qux()
 }
 
 fn qux()
-where X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT {
+where
+    X: TTTTTTTTTTTTTTTTTTTTTTTTTTTT,
+{
     baz();
 }