Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/rust.ungram')
-rw-r--r--crates/syntax/rust.ungram11
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/syntax/rust.ungram b/crates/syntax/rust.ungram
index 90441c27f6..02c59646a9 100644
--- a/crates/syntax/rust.ungram
+++ b/crates/syntax/rust.ungram
@@ -657,7 +657,14 @@ TypeBoundList =
TypeBound =
Lifetime
| ('~' 'const' | 'const')? 'async'? '?'? Type
-| 'use' GenericParamList
+| 'use' UseBoundGenericArgs
+
+UseBoundGenericArgs =
+ '<' (UseBoundGenericArg (',' UseBoundGenericArg)* ','?)? '>'
+
+UseBoundGenericArg =
+ Lifetime
+| NameRef
//************************//
// Patterns //
@@ -729,7 +736,7 @@ PathPat =
Path
OrPat =
- (Pat ('|' Pat)* '|'?)
+ '|'? (Pat ('|' Pat)*)
BoxPat =
'box' Pat