aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/complete_pattern.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-11 23:01:22 +0100
committerGitHub <[email protected]>2020-04-11 23:01:22 +0100
commita8e032820f14cad3630299a1ae16c62dcf59f358 (patch)
tree4438f81bdbf88d694b14c3c448c5bb21c8541091 /crates/ra_ide/src/completion/complete_pattern.rs
parentf13da3f895d9d401ff467a6c1fa33a4adf09fe2c (diff)
parent5e5eb6a108b00c573455d8d088742592012707be (diff)
Merge #3955
3955: Align grammar for record patterns and literals r=matklad a=matklad The grammar now looks like this [name_ref :] pat bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion/complete_pattern.rs')
-rw-r--r--crates/ra_ide/src/completion/complete_pattern.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_pattern.rs b/crates/ra_ide/src/completion/complete_pattern.rs
index 1b7d3122f..a8b4ce114 100644
--- a/crates/ra_ide/src/completion/complete_pattern.rs
+++ b/crates/ra_ide/src/completion/complete_pattern.rs
@@ -7,6 +7,10 @@ pub(super) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) {
7 if !ctx.is_pat_binding_or_const { 7 if !ctx.is_pat_binding_or_const {
8 return; 8 return;
9 } 9 }
10 if ctx.record_pat_syntax.is_some() {
11 return;
12 }
13
10 // FIXME: ideally, we should look at the type we are matching against and 14 // FIXME: ideally, we should look at the type we are matching against and
11 // suggest variants + auto-imports 15 // suggest variants + auto-imports
12 ctx.scope().process_all_names(&mut |name, res| { 16 ctx.scope().process_all_names(&mut |name, res| {