Skip to content

Commit

Permalink
Rollup merge of rust-lang#113386 - joshtriplett:style-guide-combinabl…
Browse files Browse the repository at this point in the history
…e-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.
  • Loading branch information
matthiaskrgr authored Jul 10, 2023
2 parents f4dfdbf + ddd5fd1 commit abecbe0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/doc/style-guide/src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,16 @@ foo(|param| {
action();
foo(param)
})

let x = combinable([
an_expr,
another_expr,
]);

let arr = [combinable(
an_expr,
another_expr,
)];
```

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

0 comments on commit abecbe0

Please sign in to comment.