Unnamed repository; edit this file 'description' to name the repository.
Add completion test
Jonas Schievink 2022-05-05
parent 2a75549 · commit 90bd99f
-rw-r--r--crates/ide-completion/src/completions/dot.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ide-completion/src/completions/dot.rs b/crates/ide-completion/src/completions/dot.rs
index 01a5f856c1..c660e8f8fa 100644
--- a/crates/ide-completion/src/completions/dot.rs
+++ b/crates/ide-completion/src/completions/dot.rs
@@ -785,4 +785,24 @@ fn main() {
",
)
}
+
+ #[test]
+ fn tuple_index_completion() {
+ check(
+ r#"
+struct I;
+impl I {
+ fn i_method(&self) {}
+}
+struct S((), I);
+
+fn f(s: S) {
+ s.1.$0
+}
+"#,
+ expect![[r#"
+ me i_method() fn(&self)
+ "#]],
+ );
+ }
}