Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/rust.ungram')
-rw-r--r--crates/syntax/rust.ungram8
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 408f2f4b32..e1c91c41e6 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -305,7 +305,7 @@ VariantList =
Variant =
Attr* Visibility?
- Name FieldList? ('=' ConstArg)?
+ (Name | '_') FieldList? ('=' ConstArg)?
Union =
Attr* Visibility?
@@ -442,6 +442,12 @@ Expr =
| YeetExpr
| LetExpr
| UnderscoreExpr
+| IncludeBytesExpr
+
+// We need a special expression for this because we don't have access to the file,
+// and emitting a specific array will have problems with the length.
+IncludeBytesExpr =
+ 'builtin' '#' 'include_bytes'
OffsetOfExpr =
Attr* 'builtin' '#' 'offset_of' '(' Type ',' fields:(NameRef ('.' NameRef)* ) ')'