diff options
author | Aleksey Kladov <[email protected]> | 2018-11-06 18:19:32 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-11-06 18:19:32 +0000 |
commit | ec131b6c7bd27d9034ed5e600b80420d35c00a21 (patch) | |
tree | b0007b25088335b70d1f7109824fdaeaec08a6eb /crates/ra_syntax/src/grammar | |
parent | dafe747dcc069084fc8bc771c5dcf72e7cb9ec23 (diff) |
grammar: fix where clause parsing
closes #205
Diffstat (limited to 'crates/ra_syntax/src/grammar')
-rw-r--r-- | crates/ra_syntax/src/grammar/type_params.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 68eca0ce8..f4c98675c 100644 --- a/crates/ra_syntax/src/grammar/type_params.rs +++ b/crates/ra_syntax/src/grammar/type_params.rs | |||
@@ -135,7 +135,11 @@ fn where_predicate(p: &mut Parser) { | |||
135 | if p.at(FOR_KW) { | 135 | if p.at(FOR_KW) { |
136 | types::for_binder(p); | 136 | types::for_binder(p); |
137 | } | 137 | } |
138 | types::path_type(p); | 138 | if paths::is_path_start(p) || p.at(L_ANGLE) { |
139 | types::path_type_(p, false); | ||
140 | } else { | ||
141 | p.error("expected a type"); | ||
142 | } | ||
139 | if p.at(COLON) { | 143 | if p.at(COLON) { |
140 | bounds(p); | 144 | bounds(p); |
141 | } else { | 145 | } else { |