aboutsummaryrefslogtreecommitdiff
path: root/crates/parser
diff options
context:
space:
mode:
Diffstat (limited to 'crates/parser')
-rw-r--r--crates/parser/src/grammar/type_args.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/parser/src/grammar/type_args.rs b/crates/parser/src/grammar/type_args.rs
index 42cd426bd..56266b8d4 100644
--- a/crates/parser/src/grammar/type_args.rs
+++ b/crates/parser/src/grammar/type_args.rs
@@ -59,6 +59,15 @@ fn generic_arg(p: &mut Parser) {
59 expressions::literal(p); 59 expressions::literal(p);
60 m.complete(p, CONST_ARG); 60 m.complete(p, CONST_ARG);
61 } 61 }
62 // test const_generic_negated_literal
63 // fn f() { S::<-1> }
64 T![-] => {
65 let lm = p.start();
66 p.bump(T![-]);
67 expressions::literal(p);
68 lm.complete(p, PREFIX_EXPR);
69 m.complete(p, CONST_ARG);
70 }
62 _ => { 71 _ => {
63 types::type_(p); 72 types::type_(p);
64 m.complete(p, TYPE_ARG); 73 m.complete(p, TYPE_ARG);