diff options
author | Aleksey Kladov <[email protected]> | 2018-08-13 16:23:14 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-13 16:24:17 +0100 |
commit | 9149fd2c0ca3d23719082852a2cddd8ba5804ce6 (patch) | |
tree | f15d90dc80b6fd4d8e1bb966a171cb06a64cf9c0 /crates/libsyntax2/src/grammar/type_params.rs | |
parent | d1eceefeb8b683da3f64b89446f04f01803962e1 (diff) |
Fix some parser bugs
Diffstat (limited to 'crates/libsyntax2/src/grammar/type_params.rs')
-rw-r--r-- | crates/libsyntax2/src/grammar/type_params.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/type_params.rs b/crates/libsyntax2/src/grammar/type_params.rs index 0a3e8fd07..32b69dc5b 100644 --- a/crates/libsyntax2/src/grammar/type_params.rs +++ b/crates/libsyntax2/src/grammar/type_params.rs | |||
@@ -121,7 +121,12 @@ fn where_predicate(p: &mut Parser) { | |||
121 | lifetime_bounds(p) | 121 | lifetime_bounds(p) |
122 | } else { | 122 | } else { |
123 | types::path_type(p); | 123 | types::path_type(p); |
124 | bounds(p); | 124 | if p.at(COLON) { |
125 | bounds(p); | ||
126 | } else { | ||
127 | p.error("expected colon") | ||
128 | } | ||
129 | |||
125 | } | 130 | } |
126 | m.complete(p, WHERE_PRED); | 131 | m.complete(p, WHERE_PRED); |
127 | } | 132 | } |