Skip to content

Commit 7ae6d27

Browse files
committed
Add |..| -> Type { .. } syntax for closures to index
In closures without an ascribed return type, an expression follows the vertical bars. In closures with an ascribed return type, a block follows. Let's add this second syntax to the syntax index.
1 parent 2a62276 commit 7ae6d27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syntax-index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ This appendix provides an index of tokens and common forms with links to where t
164164

165165
| Expression | Usage |
166166
|---------------------------|-------|
167-
| <code>\|\| expr</code> | [closures] |
167+
| <code>\|\| expr</code><br><code>\|\| -> Type { … }</code> | [closures] |
168168
| `ident::…` | [paths] |
169169
| `::crate_name::…` | [explicit crate paths] |
170170
| `crate::…` | [crate-relative paths] |

0 commit comments

Comments
 (0)