From 27a40e0a8844310960f12294fe7cd1f5b6d25fcb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Jul 2018 22:27:23 +0300 Subject: type param defaults --- src/parser/grammar/type_params.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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) { let m = p.start(); p.bump(); if p.eat(COLON) { + // test type_param_bounds + // struct S; loop { let has_paren = p.eat(L_PAREN); p.eat(QUESTION); @@ -61,7 +63,10 @@ pub(super) fn list(p: &mut Parser) { } } } + // test type_param_default + // struct S; if p.at(EQ) { + p.bump(); types::type_(p) } m.complete(p, TYPE_PARAM); -- cgit v1.2.3