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, 6 insertions, 3 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 991fe7d83a..3113fc7430 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -245,7 +245,7 @@ RecordFieldList =
RecordField =
Attr* Visibility? 'unsafe'?
- Name ':' Type ('=' Expr)?
+ Name ':' Type ('=' default_val:ConstArg)?
TupleFieldList =
'(' fields:(TupleField (',' TupleField)* ','?)? ')'
@@ -268,7 +268,7 @@ VariantList =
Variant =
Attr* Visibility?
- Name FieldList? ('=' Expr)?
+ Name FieldList? ('=' ConstArg)?
Union =
Attr* Visibility?
@@ -472,8 +472,11 @@ RefExpr =
TryExpr =
Attr* Expr '?'
+TryBlockModifier =
+ 'try' ('bikeshed' Type)?
+
BlockExpr =
- Attr* Label? ('try' | 'unsafe' | ('async' 'move'?) | ('gen' 'move'?) | 'const') StmtList
+ Attr* Label? (TryBlockModifier | 'unsafe' | ('async' 'move'?) | ('gen' 'move'?) | 'const') StmtList
PrefixExpr =
Attr* op:('-' | '!' | '*') Expr