diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/types.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/types.rs | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/crates/ra_syntax/src/grammar/types.rs b/crates/ra_syntax/src/grammar/types.rs index 27e5b086e..f308aef89 100644 --- a/crates/ra_syntax/src/grammar/types.rs +++ b/crates/ra_syntax/src/grammar/types.rs | |||
@@ -1,15 +1,14 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) const TYPE_FIRST: TokenSet = | 3 | pub(super) const TYPE_FIRST: TokenSet = token_set_union![ |
4 | token_set_union![ | 4 | token_set![ |
5 | token_set![ | 5 | L_PAREN, EXCL, STAR, L_BRACK, AMP, UNDERSCORE, FN_KW, UNSAFE_KW, EXTERN_KW, FOR_KW, |
6 | L_PAREN, EXCL, STAR, L_BRACK, AMP, UNDERSCORE, FN_KW, UNSAFE_KW, EXTERN_KW, FOR_KW, IMPL_KW, DYN_KW, L_ANGLE, | 6 | IMPL_KW, DYN_KW, L_ANGLE, |
7 | ], | 7 | ], |
8 | paths::PATH_FIRST, | 8 | paths::PATH_FIRST, |
9 | ]; | 9 | ]; |
10 | 10 | ||
11 | const TYPE_RECOVERY_SET: TokenSet = | 11 | const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA]; |
12 | token_set![R_PAREN, COMMA]; | ||
13 | 12 | ||
14 | pub(super) fn type_(p: &mut Parser) { | 13 | pub(super) fn type_(p: &mut Parser) { |
15 | match p.current() { | 14 | match p.current() { |
@@ -200,7 +199,6 @@ pub(super) fn for_type(p: &mut Parser) { | |||
200 | FN_KW | UNSAFE_KW | EXTERN_KW => fn_pointer_type(p), | 199 | FN_KW | UNSAFE_KW | EXTERN_KW => fn_pointer_type(p), |
201 | _ if paths::is_path_start(p) => path_type_(p, false), | 200 | _ if paths::is_path_start(p) => path_type_(p, false), |
202 | _ => p.error("expected a path"), | 201 | _ => p.error("expected a path"), |
203 | |||
204 | } | 202 | } |
205 | m.complete(p, FOR_TYPE); | 203 | m.complete(p, FOR_TYPE); |
206 | } | 204 | } |