Unnamed repository; edit this file 'description' to name the repository.
Add edit test for await skipping completions
| -rw-r--r-- | crates/ide-completion/src/completions/dot.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/ide-completion/src/completions/dot.rs b/crates/ide-completion/src/completions/dot.rs index 3a991e007a..4031097034 100644 --- a/crates/ide-completion/src/completions/dot.rs +++ b/crates/ide-completion/src/completions/dot.rs @@ -1437,5 +1437,33 @@ async fn bar() { me into_future() (use core::future::IntoFuture) fn(self) -> <Self as IntoFuture>::IntoFuture "#]], ); + check_edit( + "foo", + r#" +//- minicore: future +struct Foo; +impl Foo { + fn foo(self) {} +} + +async fn foo() -> Foo { Foo } + +async fn bar() { + foo().$0 +} +"#, + r#" +struct Foo; +impl Foo { + fn foo(self) {} +} + +async fn foo() -> Foo { Foo } + +async fn bar() { + foo().await.foo();$0 +} +"#, + ); } } |