From 9ccc104d14a93c593b8e4e3982037623a6fe5e0d Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 5 Jul 2023 15:21:56 -0700 Subject: [PATCH] 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. --- src/doc/style-guide/src/expressions.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();