mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Add completion test
This commit is contained in:
@@ -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)
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user