From d2791fa6f5624bee8ce1c9d044e3206bf8c64283 Mon Sep 17 00:00:00 2001
From: Peter Jaszkowiak
Date: Fri, 3 Nov 2023 20:50:15 -0600
Subject: [PATCH] Revert "do not combine if multiple exprs of the same kind"
This reverts commit b754b334e078637f84ae4c20f874b221352ba21f.
---
src/doc/style-guide/src/expressions.md | 45 +-------------------------
1 file changed, 1 insertion(+), 44 deletions(-)
diff --git a/src/doc/style-guide/src/expressions.md b/src/doc/style-guide/src/expressions.md
index 732897af8208f..a88404e87fb17 100644
--- a/src/doc/style-guide/src/expressions.md
+++ b/src/doc/style-guide/src/expressions.md
@@ -850,51 +850,8 @@ let x = func(an_expr, another_expr, SomeStruct {
Apply this behavior recursively.
-```rust
-foo(an_expr, bar(another_expr, SomeStruct(SomeEnum::Variant {
- field: this_is_long,
- another_field: 123,
-})));
-
-Thing(an_expr, do_something_with(another_expr, [
- one,
- two,
- three,
-]));
-```
-
-Do not apply the combining behavior if one of the prior arguments is the
-same kind of expression as the last argument.
-
-```rust
-// The `[h, v + 0.1, 0.0]` sub-array is not combinable, because
-// there is a previous sub-array in the outer array.
-func(an_expr, &[
- [h - 0.1, v, 0.0],
- [h + 0.1, v, 0.0],
- [h, v + 0.1, 0.0],
-]);
-
-// The `Thing` field struct expression is not combinable, because
-// there is a previous field struct expression in the arguments to `run`.
-func(an_expr, run(
- Foo { x: 1, y: 2, z: 3 },
- Bar { x: 1, y: 2, z: 3 },
- Thing { x: 1, y: 2, z: 3 },
-));
-
-// The `(more_exprs, last_expr)` tuple is not combinable, because
-// there is a previous tuple in the array.
-func(an_expr, [
- (another_expr, third_expr),
- (expr_four, fifth_expr),
- (more_exprs, last_expr),
-]);
-```
-
If the last argument is a multi-line closure with an explicit block,
-only apply the combining behavior if there are no other closure arguments,
-regardless of whether they have explicit blocks or occupy multiple lines.
+only apply the combining behavior if there are no other closure arguments.
```rust
// Combinable