diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar/type_params.rs')
-rw-r--r-- | crates/libsyntax2/src/grammar/type_params.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/type_params.rs b/crates/libsyntax2/src/grammar/type_params.rs index 32b69dc5b..a97eeb142 100644 --- a/crates/libsyntax2/src/grammar/type_params.rs +++ b/crates/libsyntax2/src/grammar/type_params.rs | |||
@@ -118,7 +118,11 @@ fn where_predicate(p: &mut Parser) { | |||
118 | let m = p.start(); | 118 | let m = p.start(); |
119 | if p.at(LIFETIME) { | 119 | if p.at(LIFETIME) { |
120 | p.eat(LIFETIME); | 120 | p.eat(LIFETIME); |
121 | lifetime_bounds(p) | 121 | if p.at(COLON) { |
122 | lifetime_bounds(p) | ||
123 | } else { | ||
124 | p.error("expected colon") | ||
125 | } | ||
122 | } else { | 126 | } else { |
123 | types::path_type(p); | 127 | types::path_type(p); |
124 | if p.at(COLON) { | 128 | if p.at(COLON) { |