Skip to content

Commit 29944c5

Browse files
pitajjoshtriplett
andauthored
add example with struct literal
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
1 parent 60a783b commit 29944c5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,11 @@ let x = format!("Stuff: {}", [
841841
an_expr,
842842
another_expr,
843843
]);
844+
845+
let x = func(an_expr, another_expr, SomeStruct {
846+
field: this_is_long,
847+
another_field: 123,
848+
});
844849
```
845850

846851
Apply this behavior recursively.

0 commit comments

Comments
 (0)