diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2017-01-23 16:40:47 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-23 16:40:47 -0500 |
| commit | fb5b0d033f981906f2c51f2207e2268304698ec0 (patch) | |
| tree | 8bba9d48a131bcddca61d23c1af109517ea21201 /src/doc | |
| parent | 12b46292c672b7c0afd1c2c63559a61fdf01466c (diff) | |
| parent | 487ca5ccc52fe27b9352c2b467c91d231ecf9ae7 (diff) | |
| download | rust-fb5b0d033f981906f2c51f2207e2268304698ec0.tar.gz rust-fb5b0d033f981906f2c51f2207e2268304698ec0.zip | |
Rollup merge of #38956 - theduke:document-field-init-shorthand-38830, r=steveklabnik
Update struct_expr grammar for field init shorthand. Part of the work for #38830 . r? @steveklabnik
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/grammar.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/doc/grammar.md b/src/doc/grammar.md index 690d44cc2cb..c81f2e2282b 100644 --- a/src/doc/grammar.md +++ b/src/doc/grammar.md @@ -510,8 +510,9 @@ unit_expr : "()" ; ### Structure expressions ```antlr -struct_expr : expr_path '{' ident ':' expr - [ ',' ident ':' expr ] * +struct_expr_field_init : ident | ident ':' expr ; +struct_expr : expr_path '{' struct_expr_field_init + [ ',' struct_expr_field_init ] * [ ".." expr ] '}' | expr_path '(' expr [ ',' expr ] * ')' | |
