about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/style-guide/src/statements.md26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/doc/style-guide/src/statements.md b/src/doc/style-guide/src/statements.md
index 9bc521e1c7b..a5cd6da1061 100644
--- a/src/doc/style-guide/src/statements.md
+++ b/src/doc/style-guide/src/statements.md
@@ -159,8 +159,8 @@ before the `else`.
 
 If the initializer expression is multi-line, the `else` keyword and opening
 brace of the block (i.e. `else {`) should be put on the same line as the end of
-the initializer expression, with a space between them, if all the following are
-true:
+the initializer expression, with a space between them, if and only if all the
+following are true:
 
 * The initializer expression ends with one or more closing
   parentheses, square brackets, and/or braces
@@ -209,6 +209,28 @@ fn main() {
     else {
         return;
     };
+
+    let LongStructName(AnotherStruct {
+        multi,
+        line,
+        pattern,
+    }) = slice.as_ref()
+    else {
+        return;
+    };
+
+    let LongStructName(AnotherStruct {
+        multi,
+        line,
+        pattern,
+    }) = multi_line_function_call(
+        arg1,
+        arg2,
+        arg3,
+        arg4,
+    ) else {
+        return;
+    };
 }
 ```