aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-12 21:04:13 +0000
committerGitHub <[email protected]>2020-03-12 21:04:13 +0000
commit2f9f409538553fc709bbcad1a5c76968f36e5968 (patch)
treed8c4e9e376e71a62fda48dd976be828d60edc4c7 /crates/ra_ide/src/completion
parentfab40db8bdfdac5cde5789f74d1ec28e60a8bb7e (diff)
parenta6bb4cd0ecd4b1996a964287713cff365e2d7088 (diff)
Merge #3568
3568: Fix completion tests r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/completion')
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs2
-rw-r--r--crates/ra_ide/src/completion/completion_item.rs3
-rw-r--r--crates/ra_ide/src/completion/presentation.rs7
3 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_ide/src/completion/complete_scope.rs b/crates/ra_ide/src/completion/complete_scope.rs
index bd4adf23a..ed55baa64 100644
--- a/crates/ra_ide/src/completion/complete_scope.rs
+++ b/crates/ra_ide/src/completion/complete_scope.rs
@@ -42,6 +42,7 @@ mod tests {
42 kind: Function, 42 kind: Function,
43 lookup: "quux", 43 lookup: "quux",
44 detail: "fn quux(x: i32)", 44 detail: "fn quux(x: i32)",
45 trigger_call_info: true,
45 }, 46 },
46 CompletionItem { 47 CompletionItem {
47 label: "x", 48 label: "x",
@@ -844,6 +845,7 @@ mod tests {
844 kind: Function, 845 kind: Function,
845 lookup: "quux", 846 lookup: "quux",
846 detail: "fn quux(x: i32)", 847 detail: "fn quux(x: i32)",
848 trigger_call_info: true,
847 }, 849 },
848 CompletionItem { 850 CompletionItem {
849 label: "x", 851 label: "x",
diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs
index ef0eb43b2..bc0f1aff5 100644
--- a/crates/ra_ide/src/completion/completion_item.rs
+++ b/crates/ra_ide/src/completion/completion_item.rs
@@ -80,6 +80,9 @@ impl fmt::Debug for CompletionItem {
80 if self.deprecated { 80 if self.deprecated {
81 s.field("deprecated", &true); 81 s.field("deprecated", &true);
82 } 82 }
83 if self.trigger_call_info {
84 s.field("trigger_call_info", &true);
85 }
83 s.finish() 86 s.finish()
84 } 87 }
85} 88}
diff --git a/crates/ra_ide/src/completion/presentation.rs b/crates/ra_ide/src/completion/presentation.rs
index 5213def20..a4e9aefe2 100644
--- a/crates/ra_ide/src/completion/presentation.rs
+++ b/crates/ra_ide/src/completion/presentation.rs
@@ -510,6 +510,7 @@ mod tests {
510 kind: Function, 510 kind: Function,
511 lookup: "with_args", 511 lookup: "with_args",
512 detail: "fn with_args(x: i32, y: String)", 512 detail: "fn with_args(x: i32, y: String)",
513 trigger_call_info: true,
513 }, 514 },
514 ] 515 ]
515 "### 516 "###
@@ -566,6 +567,7 @@ mod tests {
566 kind: Method, 567 kind: Method,
567 lookup: "foo", 568 lookup: "foo",
568 detail: "fn foo(&self, x: i32)", 569 detail: "fn foo(&self, x: i32)",
570 trigger_call_info: true,
569 }, 571 },
570 ] 572 ]
571 "### 573 "###
@@ -600,6 +602,7 @@ mod tests {
600 kind: Method, 602 kind: Method,
601 lookup: "foo", 603 lookup: "foo",
602 detail: "fn foo(&self, x: i32)", 604 detail: "fn foo(&self, x: i32)",
605 trigger_call_info: true,
603 }, 606 },
604 ] 607 ]
605 "### 608 "###
@@ -718,6 +721,7 @@ mod tests {
718 kind: Function, 721 kind: Function,
719 lookup: "foo", 722 lookup: "foo",
720 detail: "fn foo(xs: Ve)", 723 detail: "fn foo(xs: Ve)",
724 trigger_call_info: true,
721 }, 725 },
722 ] 726 ]
723 "### 727 "###
@@ -747,6 +751,7 @@ mod tests {
747 kind: Function, 751 kind: Function,
748 lookup: "foo", 752 lookup: "foo",
749 detail: "fn foo(xs: Ve)", 753 detail: "fn foo(xs: Ve)",
754 trigger_call_info: true,
750 }, 755 },
751 ] 756 ]
752 "### 757 "###
@@ -775,6 +780,7 @@ mod tests {
775 kind: Function, 780 kind: Function,
776 lookup: "foo", 781 lookup: "foo",
777 detail: "fn foo(xs: Ve)", 782 detail: "fn foo(xs: Ve)",
783 trigger_call_info: true,
778 }, 784 },
779 ] 785 ]
780 "### 786 "###
@@ -803,6 +809,7 @@ mod tests {
803 kind: Function, 809 kind: Function,
804 lookup: "foo", 810 lookup: "foo",
805 detail: "fn foo(xs: Ve<i128>)", 811 detail: "fn foo(xs: Ve<i128>)",
812 trigger_call_info: true,
806 }, 813 },
807 ] 814 ]
808 "### 815 "###