Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/rust.ungram')
-rw-r--r--crates/syntax/rust.ungram16
1 files changed, 12 insertions, 4 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index ea7ebd85b3..2ce609b97a 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -340,10 +340,10 @@ ExprStmt =
Expr =
ArrayExpr
+| AsmExpr
| AwaitExpr
| BinExpr
| BlockExpr
-| BoxExpr
| BreakExpr
| CallExpr
| CastExpr
@@ -351,6 +351,7 @@ Expr =
| ContinueExpr
| FieldExpr
| ForExpr
+| FormatArgsExpr
| IfExpr
| IndexExpr
| Literal
@@ -358,6 +359,7 @@ Expr =
| MacroExpr
| MatchExpr
| MethodCallExpr
+| OffsetOfExpr
| ParenExpr
| PathExpr
| PrefixExpr
@@ -373,6 +375,15 @@ Expr =
| LetExpr
| UnderscoreExpr
+OffsetOfExpr =
+ Attr* 'builtin' '#' 'offset_of' '(' Type ',' fields:(NameRef ('.' NameRef)* ) ')'
+
+AsmExpr =
+ Attr* 'builtin' '#' 'asm' '(' Expr ')'
+
+FormatArgsExpr =
+ Attr* 'builtin' '#' 'format_args' '(' ')'
+
MacroExpr =
MacroCall
@@ -526,9 +537,6 @@ UnderscoreExpr =
AwaitExpr =
Attr* Expr '.' 'await'
-BoxExpr =
- Attr* 'box' Expr
-
//*************************//
// Types //
//*************************//