aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/type_params.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/grammar/type_params.rs')
-rw-r--r--src/parser/grammar/type_params.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser/grammar/type_params.rs b/src/parser/grammar/type_params.rs
index ccb44c0df..2affd47cc 100644
--- a/src/parser/grammar/type_params.rs
+++ b/src/parser/grammar/type_params.rs
@@ -57,6 +57,10 @@ pub(super) fn list(p: &mut Parser) {
57pub(super) fn bounds(p: &mut Parser) { 57pub(super) fn bounds(p: &mut Parser) {
58 assert!(p.at(COLON)); 58 assert!(p.at(COLON));
59 p.bump(); 59 p.bump();
60 bounds_without_colon(p);
61}
62
63pub(super) fn bounds_without_colon(p: &mut Parser) {
60 loop { 64 loop {
61 let has_paren = p.eat(L_PAREN); 65 let has_paren = p.eat(L_PAREN);
62 p.eat(QUESTION); 66 p.eat(QUESTION);
@@ -79,6 +83,7 @@ pub(super) fn bounds(p: &mut Parser) {
79 } 83 }
80} 84}
81 85
86
82pub(super) fn where_clause(p: &mut Parser) { 87pub(super) fn where_clause(p: &mut Parser) {
83 if p.at(WHERE_KW) { 88 if p.at(WHERE_KW) {
84 let m = p.start(); 89 let m = p.start();