diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/type_params.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/type_params.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 79bc95ce4..79f5036b4 100644 --- a/crates/ra_syntax/src/grammar/type_params.rs +++ b/crates/ra_syntax/src/grammar/type_params.rs | |||
@@ -72,12 +72,8 @@ pub(super) fn bounds_without_colon(p: &mut Parser) { | |||
72 | p.eat(QUESTION); | 72 | p.eat(QUESTION); |
73 | match p.current() { | 73 | match p.current() { |
74 | LIFETIME => p.bump(), | 74 | LIFETIME => p.bump(), |
75 | FOR_KW => { | 75 | FOR_KW => types::for_type(p), |
76 | types::for_type(p) | 76 | _ if paths::is_path_start(p) => types::path_type(p), |
77 | } | ||
78 | _ if paths::is_path_start(p) => { | ||
79 | types::path_type(p) | ||
80 | } | ||
81 | _ => break, | 77 | _ => break, |
82 | } | 78 | } |
83 | if has_paren { | 79 | if has_paren { |
@@ -104,7 +100,7 @@ pub(super) fn opt_where_clause(p: &mut Parser) { | |||
104 | p.bump(); | 100 | p.bump(); |
105 | loop { | 101 | loop { |
106 | if !(paths::is_path_start(p) || p.current() == LIFETIME) { | 102 | if !(paths::is_path_start(p) || p.current() == LIFETIME) { |
107 | break | 103 | break; |
108 | } | 104 | } |
109 | where_predicate(p); | 105 | where_predicate(p); |
110 | if p.current() != L_CURLY && p.current() != SEMI { | 106 | if p.current() != L_CURLY && p.current() != SEMI { |
@@ -130,7 +126,6 @@ fn where_predicate(p: &mut Parser) { | |||
130 | } else { | 126 | } else { |
131 | p.error("expected colon") | 127 | p.error("expected colon") |
132 | } | 128 | } |
133 | |||
134 | } | 129 | } |
135 | m.complete(p, WHERE_PRED); | 130 | m.complete(p, WHERE_PRED); |
136 | } | 131 | } |