aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMichael Chesser <[email protected]>2019-03-13 23:38:49 +0000
committerMichael Chesser <[email protected]>2019-03-14 08:54:11 +0000
commit16418c35bc18be6b77a379c2f460bb76f2cc7acd (patch)
tree744c487841bb8dc6b9440a9e7b2d0e928641ffe1 /crates
parentf7065c294c24b48014f2b2594126dad4a43caee8 (diff)
Allow MINUS at the start of a pattern.
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_parser/src/grammar/patterns.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs
index befe6687d..9a307559b 100644
--- a/crates/ra_parser/src/grammar/patterns.rs
+++ b/crates/ra_parser/src/grammar/patterns.rs
@@ -2,7 +2,7 @@ use super::*;
2 2
3pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST 3pub(super) const PATTERN_FIRST: TokenSet = expressions::LITERAL_FIRST
4 .union(paths::PATH_FIRST) 4 .union(paths::PATH_FIRST)
5 .union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE]); 5 .union(token_set![REF_KW, MUT_KW, L_PAREN, L_BRACK, AMP, UNDERSCORE, MINUS]);
6 6
7pub(super) fn pattern(p: &mut Parser) { 7pub(super) fn pattern(p: &mut Parser) {
8 pattern_r(p, PAT_RECOVERY_SET) 8 pattern_r(p, PAT_RECOVERY_SET)