Skip to content

Commit 16943e5

Browse files
committed
Minor, use T!
1 parent d4d384e commit 16943e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/ra_parser/src/grammar/paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use super::*;
44

55
pub(super) const PATH_FIRST: TokenSet =
6-
token_set![IDENT, SELF_KW, SUPER_KW, CRATE_KW, COLON, L_ANGLE];
6+
token_set![IDENT, T![self], T![super], T![crate], T![:], T![<]];
77

88
pub(super) fn is_path_start(p: &Parser) -> bool {
99
is_use_path_start(p) || p.at(T![<])

crates/ra_parser/src/grammar/patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use super::*;
44

55
pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST
66
.union(paths::PATH_FIRST)
7-
.union(token_set![BOX_KW, REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE, MINUS, DOT]);
7+
.union(token_set![T![box], T![ref], T![mut], T!['('], T!['['], T![&], T![_], T![-], T![.]]);
88

99
pub(crate) fn pattern(p: &mut Parser) {
1010
pattern_r(p, PAT_RECOVERY_SET);

0 commit comments

Comments
 (0)