Skip to content

Commit 3e99ee1

Browse files
bors[bot]Veykril
andauthored
Merge #24
24: Fix incorrect rust.ungram rules for `Impl` and `RecordExprField` r=matklad a=Veykril Regarding RecordExprField see https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/RecordExprField.20parse.20vs.20ungrammar.20definition Regarding `const` position in `Impl` see https://github.com/oli-obk/rfcs/blob/const_generic_const_fn_bounds/text/0000-const-generic-const-fn-bounds.md#generic-bounds Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2 parents 45d4794 + effe644 commit 3e99ee1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "ungrammar"
33
description = "A DSL for describing concrete syntax trees"
4-
version = "1.9.2"
4+
version = "1.9.3"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/matklad/ungrammar"
77
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]

rust.ungram

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ AssocItem =
251251
Impl =
252252
Attr* Visibility?
253253
'default'? 'unsafe'?
254-
'impl' 'const'? GenericParamList? ('!'? trait:Type 'for')? self_ty:Type WhereClause?
254+
'impl' GenericParamList? ('const'? '!'? trait:Type 'for')? self_ty:Type WhereClause?
255255
AssocItemList
256256

257257
ExternBlock =
@@ -418,7 +418,7 @@ RecordExprFieldList =
418418
'}'
419419

420420
RecordExprField =
421-
Attr* NameRef (':' Expr)?
421+
Attr* (NameRef ':')? Expr
422422

423423
CallExpr =
424424
Attr* Expr ArgList

0 commit comments

Comments
 (0)