diff options
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r-- | crates/ra_syntax/src/grammar/type_params.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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) { | |||
96 | // 'a: 'b + 'c, | 96 | // 'a: 'b + 'c, |
97 | // T: Clone + Copy + 'static, | 97 | // T: Clone + Copy + 'static, |
98 | // Iterator::Item: 'a, | 98 | // Iterator::Item: 'a, |
99 | // <T as Iterator>::Item: 'a | ||
99 | // {} | 100 | // {} |
100 | pub(super) fn opt_where_clause(p: &mut Parser) { | 101 | pub(super) fn opt_where_clause(p: &mut Parser) { |
101 | if !p.at(WHERE_KW) { | 102 | if !p.at(WHERE_KW) { |
@@ -104,7 +105,11 @@ pub(super) fn opt_where_clause(p: &mut Parser) { | |||
104 | let m = p.start(); | 105 | let m = p.start(); |
105 | p.bump(); | 106 | p.bump(); |
106 | loop { | 107 | loop { |
107 | if !(paths::is_path_start(p) || p.current() == LIFETIME || p.current() == FOR_KW) { | 108 | if !(paths::is_path_start(p) |
109 | || p.current() == LIFETIME | ||
110 | || p.current() == FOR_KW | ||
111 | || p.current() == L_ANGLE) | ||
112 | { | ||
108 | break; | 113 | break; |
109 | } | 114 | } |
110 | where_predicate(p); | 115 | where_predicate(p); |