Skip to content

Commit 548d70f

Browse files
committed
Add edit test for await skipping completions
1 parent 5a97637 commit 548d70f

File tree

1 file changed

+28
-0
lines changed
  • src/tools/rust-analyzer/crates/ide-completion/src/completions

1 file changed

+28
-0
lines changed

src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,5 +1437,33 @@ async fn bar() {
14371437
me into_future() (use core::future::IntoFuture) fn(self) -> <Self as IntoFuture>::IntoFuture
14381438
"#]],
14391439
);
1440+
check_edit(
1441+
"foo",
1442+
r#"
1443+
//- minicore: future
1444+
struct Foo;
1445+
impl Foo {
1446+
fn foo(self) {}
1447+
}
1448+
1449+
async fn foo() -> Foo { Foo }
1450+
1451+
async fn bar() {
1452+
foo().$0
1453+
}
1454+
"#,
1455+
r#"
1456+
struct Foo;
1457+
impl Foo {
1458+
fn foo(self) {}
1459+
}
1460+
1461+
async fn foo() -> Foo { Foo }
1462+
1463+
async fn bar() {
1464+
foo().await.foo();$0
1465+
}
1466+
"#,
1467+
);
14401468
}
14411469
}

0 commit comments

Comments
 (0)