Skip to content

Commit 685623d

Browse files
authored
Rollup merge of rust-lang#113386 - joshtriplett:style-guide-combinable-expressions, r=compiler-errors
style-guide: Expand example of combinable expressions to include arrays Arrays are allowed as combinable expressions, but none of the examples show that.
2 parents 05b82e5 + ddd5fd1 commit 685623d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/doc/style-guide/src/expressions.md

+10
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,16 @@ foo(|param| {
803803
action();
804804
foo(param)
805805
})
806+
807+
let x = combinable([
808+
an_expr,
809+
another_expr,
810+
]);
811+
812+
let arr = [combinable(
813+
an_expr,
814+
another_expr,
815+
)];
806816
```
807817

808818
Such behaviour should extend recursively, however, tools may choose to limit the

0 commit comments

Comments
 (0)