aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/type_args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src/grammar/type_args.rs')
-rw-r--r--crates/ra_parser/src/grammar/type_args.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/type_args.rs b/crates/ra_parser/src/grammar/type_args.rs
index 7256c2697..33d9973e9 100644
--- a/crates/ra_parser/src/grammar/type_args.rs
+++ b/crates/ra_parser/src/grammar/type_args.rs
@@ -26,7 +26,7 @@ pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) {
26} 26}
27 27
28// test type_arg 28// test type_arg
29// type A = B<'static, i32, Item=u64>; 29// type A = B<'static, i32, 1, { 2 }, Item=u64>;
30fn type_arg(p: &mut Parser) { 30fn type_arg(p: &mut Parser) {
31 let m = p.start(); 31 let m = p.start();
32 match p.current() { 32 match p.current() {
@@ -47,6 +47,14 @@ fn type_arg(p: &mut Parser) {
47 types::type_(p); 47 types::type_(p);
48 m.complete(p, ASSOC_TYPE_ARG); 48 m.complete(p, ASSOC_TYPE_ARG);
49 } 49 }
50 T!['{'] => {
51 expressions::block(p);
52 m.complete(p, CONST_ARG);
53 }
54 k if k.is_literal() => {
55 p.bump(k);
56 m.complete(p, CONST_ARG);
57 }
50 _ => { 58 _ => {
51 types::type_(p); 59 types::type_(p);
52 m.complete(p, TYPE_ARG); 60 m.complete(p, TYPE_ARG);