Skip to content

Commit 90bd99f

Browse files
author
Jonas Schievink
committed
Add completion test
1 parent 2a75549 commit 90bd99f

File tree

1 file changed

+20
-0
lines changed
  • crates/ide-completion/src/completions

1 file changed

+20
-0
lines changed

crates/ide-completion/src/completions/dot.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,4 +785,24 @@ fn main() {
785785
",
786786
)
787787
}
788+
789+
#[test]
790+
fn tuple_index_completion() {
791+
check(
792+
r#"
793+
struct I;
794+
impl I {
795+
fn i_method(&self) {}
796+
}
797+
struct S((), I);
798+
799+
fn f(s: S) {
800+
s.1.$0
801+
}
802+
"#,
803+
expect![[r#"
804+
me i_method() fn(&self)
805+
"#]],
806+
);
807+
}
788808
}

0 commit comments

Comments
 (0)