diff options
Diffstat (limited to 'crates/ra_parser/src/grammar/type_args.rs')
-rw-r--r-- | crates/ra_parser/src/grammar/type_args.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_parser/src/grammar/type_args.rs b/crates/ra_parser/src/grammar/type_args.rs index 684976b99..f391b63db 100644 --- a/crates/ra_parser/src/grammar/type_args.rs +++ b/crates/ra_parser/src/grammar/type_args.rs | |||
@@ -3,26 +3,26 @@ use super::*; | |||
3 | pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { | 3 | pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { |
4 | let m; | 4 | let m; |
5 | match (colon_colon_required, p.nth(0), p.nth(1)) { | 5 | match (colon_colon_required, p.nth(0), p.nth(1)) { |
6 | (_, COLONCOLON, L_ANGLE) => { | 6 | (_, T![::], T![<]) => { |
7 | m = p.start(); | 7 | m = p.start(); |
8 | p.bump(); | 8 | p.bump(); |
9 | p.bump(); | 9 | p.bump(); |
10 | } | 10 | } |
11 | (false, L_ANGLE, EQ) => return, | 11 | (false, T![<], T![=]) => return, |
12 | (false, L_ANGLE, _) => { | 12 | (false, T![<], _) => { |
13 | m = p.start(); | 13 | m = p.start(); |
14 | p.bump(); | 14 | p.bump(); |
15 | } | 15 | } |
16 | _ => return, | 16 | _ => return, |
17 | }; | 17 | }; |
18 | 18 | ||
19 | while !p.at(EOF) && !p.at(R_ANGLE) { | 19 | while !p.at(EOF) && !p.at(T![>]) { |
20 | type_arg(p); | 20 | type_arg(p); |
21 | if !p.at(R_ANGLE) && !p.expect(COMMA) { | 21 | if !p.at(T![>]) && !p.expect(T![,]) { |
22 | break; | 22 | break; |
23 | } | 23 | } |
24 | } | 24 | } |
25 | p.expect(R_ANGLE); | 25 | p.expect(T![>]); |
26 | m.complete(p, TYPE_ARG_LIST); | 26 | m.complete(p, TYPE_ARG_LIST); |
27 | } | 27 | } |
28 | 28 | ||
@@ -35,7 +35,7 @@ fn type_arg(p: &mut Parser) { | |||
35 | p.bump(); | 35 | p.bump(); |
36 | m.complete(p, LIFETIME_ARG); | 36 | m.complete(p, LIFETIME_ARG); |
37 | } | 37 | } |
38 | IDENT if p.nth(1) == EQ => { | 38 | IDENT if p.nth(1) == T![=] => { |
39 | name_ref(p); | 39 | name_ref(p); |
40 | p.bump(); | 40 | p.bump(); |
41 | types::type_(p); | 41 | types::type_(p); |