about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2023-07-05 15:21:56 -0700
committerJosh Triplett <josh@joshtriplett.org>2023-07-20 17:57:21 -0700
commit9ccc104d14a93c593b8e4e3982037623a6fe5e0d (patch)
tree3ac50c7e796bfdc1a2fae8a7470d55813d6ae7c3 /src/doc
parentce5aca9f5a1726ef892f0feca34ba5454c164857 (diff)
downloadrust-9ccc104d14a93c593b8e4e3982037623a6fe5e0d.tar.gz
rust-9ccc104d14a93c593b8e4e3982037623a6fe5e0d.zip
style-guide: Add an additional chaining example
Make it clear the rule for stacking the second line on the first applies
recursively, as long as the condition holds.
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/style-guide/src/expressions.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/doc/style-guide/src/expressions.md b/src/doc/style-guide/src/expressions.md
index fec6ae5acf3..633fdc909bd 100644
--- a/src/doc/style-guide/src/expressions.md
+++ b/src/doc/style-guide/src/expressions.md
@@ -456,12 +456,15 @@ let foo = bar
 
 If the length of the last line of the first element plus its indentation is
 less than or equal to the indentation of the second line, then combine the
-first and second lines if they fit:
+first and second lines if they fit. Apply this rule recursively.
 
 ```rust
 x.baz?
     .qux()
 
+x.y.z
+    .qux()
+
 let foo = x
     .baz?
     .qux();