From bd5a3589109df3afde67640cd4b36b91d9271d8a Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Fri, 21 Dec 2018 17:20:38 +0000 Subject: Fix where clauses using fully qualified path syntax --- crates/ra_syntax/src/grammar/type_params.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') diff --git a/crates/ra_syntax/src/grammar/type_params.rs b/crates/ra_syntax/src/grammar/type_params.rs index 863f8e00c..7db25beba 100644 --- a/crates/ra_syntax/src/grammar/type_params.rs +++ b/crates/ra_syntax/src/grammar/type_params.rs @@ -96,6 +96,7 @@ pub(super) fn bounds_without_colon(p: &mut Parser) { // 'a: 'b + 'c, // T: Clone + Copy + 'static, // Iterator::Item: 'a, +// ::Item: 'a // {} pub(super) fn opt_where_clause(p: &mut Parser) { if !p.at(WHERE_KW) { @@ -104,7 +105,11 @@ pub(super) fn opt_where_clause(p: &mut Parser) { let m = p.start(); p.bump(); loop { - if !(paths::is_path_start(p) || p.current() == LIFETIME || p.current() == FOR_KW) { + if !(paths::is_path_start(p) + || p.current() == LIFETIME + || p.current() == FOR_KW + || p.current() == L_ANGLE) + { break; } where_predicate(p); -- cgit v1.2.3