From 4a7e19946a60b4cba6ef9d9916ae0fbec65c74da Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 20 Dec 2019 23:11:07 +0800 Subject: Fix parser for macro call in pattern position --- crates/ra_parser/src/grammar/patterns.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_parser/src/grammar') diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index f5d12278c..422a4e3dc 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs @@ -50,7 +50,7 @@ pub(super) fn pattern_r(p: &mut Parser, recovery_set: TokenSet) { // let m!(x) = 0; // } if lhs.kind() == PATH_PAT && p.at(T![!]) { - let m = lhs.precede(p); + let m = lhs.undo_completion(p); items::macro_call_after_excl(p); m.complete(p, MACRO_CALL); } -- cgit v1.2.3