diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-06 18:20:30 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-11-06 18:20:30 +0000 |
commit | 21797bf0efdeafde4148fe02ba4bd11171737872 (patch) | |
tree | b0007b25088335b70d1f7109824fdaeaec08a6eb /crates/ra_syntax/src/grammar | |
parent | dafe747dcc069084fc8bc771c5dcf72e7cb9ec23 (diff) | |
parent | ec131b6c7bd27d9034ed5e600b80420d35c00a21 (diff) |
Merge #208
208: grammar: fix where clause parsing r=matklad a=matklad
closes #205
Co-authored-by: Aleksey Kladov <[email protected]>
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 { |