From c5798c4d75aa807aec47208a49101bdec3affcca Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:28:28 +0200 Subject: Finalize impl Grammar --- xtask/src/codegen/rust.ungram | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'xtask/src/codegen') diff --git a/xtask/src/codegen/rust.ungram b/xtask/src/codegen/rust.ungram index b30658397..cda0e8fbb 100644 --- a/xtask/src/codegen/rust.ungram +++ b/xtask/src/codegen/rust.ungram @@ -9,7 +9,7 @@ Item = | ExternBlock | ExternCrate | Fn -| ImplDef +| Impl | MacroCall | Module | Static @@ -131,9 +131,12 @@ Trait = AssocItemList = '{' AssocItem* '}' -ImplDef = - Attr* Visibility? 'const'? 'default'? 'unsafe'? 'impl' GenericParamList? '!'? 'for' - WhereClause? +Impl = + Attr* Visibility? + 'default'? 'unsafe'? 'impl' 'const'? GenericParamList? ( + TypeRef + | '!'? TypeRef 'for' TypeRef + ) WhereClause? AssocItemList ParenType = -- cgit v1.2.3