summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/syntax/rust.ungram
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rust-analyzer/crates/syntax/rust.ungram')
-rw-r--r--src/tools/rust-analyzer/crates/syntax/rust.ungram10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/rust.ungram b/src/tools/rust-analyzer/crates/syntax/rust.ungram
index 548b5ba8b..b096c9974 100644
--- a/src/tools/rust-analyzer/crates/syntax/rust.ungram
+++ b/src/tools/rust-analyzer/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
@@ -563,7 +565,7 @@ RefType =
'&' Lifetime? 'mut'? Type
ArrayType =
- '[' Type ';' Expr ']'
+ '[' Type ';' ConstArg ']'
SliceType =
'[' Type ']'
@@ -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)?