Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/rust.ungram')
-rw-r--r--crates/syntax/rust.ungram9
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 70a91af6c4..a0ae0d6858 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -240,7 +240,7 @@ RecordFieldList =
'{' fields:(RecordField (',' RecordField)* ','?)? '}'
RecordField =
- Attr* Visibility?
+ Attr* Visibility? 'unsafe'?
Name ':' Type ('=' Expr)?
TupleFieldList =
@@ -287,8 +287,9 @@ VariantDef =
Const =
Attr* Visibility?
'default'?
- 'const' (Name | '_') ':' Type
- ('=' body:Expr)? ';'
+ 'const' (Name | '_') GenericParamList? ':' Type
+ ('=' body:Expr)?
+ WhereClause? ';'
Static =
Attr* Visibility?
@@ -348,7 +349,7 @@ Stmt =
| LetStmt
LetStmt =
- Attr* 'let' Pat (':' Type)?
+ Attr* 'super'? 'let' Pat (':' Type)?
'=' initializer:Expr
LetElse?
';'