aboutsummaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-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 9ea08a55c..ba0d4bfe8 100644
--- a/src/parser/grammar/type_params.rs
+++ b/src/parser/grammar/type_params.rs
@@ -40,6 +40,8 @@ pub(super) fn list(p: &mut Parser) {
40 let m = p.start(); 40 let m = p.start();
41 p.bump(); 41 p.bump();
42 if p.eat(COLON) { 42 if p.eat(COLON) {
43 // test type_param_bounds
44 // struct S<T: 'a + ?Sized + (Copy)>;
43 loop { 45 loop {
44 let has_paren = p.eat(L_PAREN); 46 let has_paren = p.eat(L_PAREN);
45 p.eat(QUESTION); 47 p.eat(QUESTION);
@@ -61,7 +63,10 @@ pub(super) fn list(p: &mut Parser) {
61 } 63 }
62 } 64 }
63 } 65 }
66 // test type_param_default
67 // struct S<T = i32>;
64 if p.at(EQ) { 68 if p.at(EQ) {
69 p.bump();
65 types::type_(p) 70 types::type_(p)
66 } 71 }
67 m.complete(p, TYPE_PARAM); 72 m.complete(p, TYPE_PARAM);