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, 5 insertions, 3 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 548b5ba8b8..4c9027dec6 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -51,7 +51,9 @@ TypeArg =
Type
AssocTypeArg =
- NameRef GenericArgList? (':' TypeBoundList | ('=' Type | ConstArg))
+ NameRef
+ (GenericArgList | ParamList RetType?)?
+ (':' TypeBoundList | ('=' Type | ConstArg))
LifetimeArg =
Lifetime
@@ -581,7 +583,7 @@ ImplTraitType =
'impl' TypeBoundList
DynTraitType =
- 'dyn' TypeBoundList
+ 'dyn'? TypeBoundList
TypeBoundList =
bounds:(TypeBound ('+' TypeBound)* '+'?)
@@ -613,7 +615,7 @@ Pat =
| ConstBlockPat
LiteralPat =
- Literal
+ '-'? Literal
IdentPat =
Attr* 'ref'? 'mut'? Name ('@' Pat)?