From 439e0fd32eb943ad7a0be37baf9a19791840ae1e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 13 Aug 2018 18:46:43 +0300 Subject: Fix some more bugs --- crates/libsyntax2/src/grammar/type_params.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates/libsyntax2/src/grammar/type_params.rs') 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) { let m = p.start(); if p.at(LIFETIME) { p.eat(LIFETIME); - lifetime_bounds(p) + if p.at(COLON) { + lifetime_bounds(p) + } else { + p.error("expected colon") + } } else { types::path_type(p); if p.at(COLON) { -- cgit v1.2.3