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.ungram9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/syntax/rust.ungram b/src/tools/rust-analyzer/crates/syntax/rust.ungram
index 894795435..0a0cb0290 100644
--- a/src/tools/rust-analyzer/crates/syntax/rust.ungram
+++ b/src/tools/rust-analyzer/crates/syntax/rust.ungram
@@ -51,7 +51,7 @@ TypeArg =
Type
AssocTypeArg =
- NameRef GenericParamList? (':' TypeBoundList | ('=' Type | ConstArg))
+ NameRef GenericArgList? (':' TypeBoundList | ('=' Type | ConstArg))
LifetimeArg =
Lifetime
@@ -239,8 +239,11 @@ Static =
Trait =
Attr* Visibility?
'unsafe'? 'auto'?
- 'trait' Name GenericParamList? (':' TypeBoundList?)? WhereClause?
- AssocItemList
+ 'trait' Name GenericParamList?
+ (
+ (':' TypeBoundList?)? WhereClause? AssocItemList
+ | '=' TypeBoundList? WhereClause? ';'
+ )
AssocItemList =
'{' Attr* AssocItem* '}'