diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2025-01-16 10:56:57 +0100 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2025-01-16 10:56:57 +0100 |
| commit | 548d70f8aa8292a52c1d20f9691b218e0d241b92 (patch) | |
| tree | f914f87ae5ea63a93db2327c1798e0dada81ab15 | |
| parent | 5a9763750e885722b98d1e2c26cebb1caac52f9d (diff) | |
| download | rust-548d70f8aa8292a52c1d20f9691b218e0d241b92.tar.gz rust-548d70f8aa8292a52c1d20f9691b218e0d241b92.zip | |
Add edit test for await skipping completions
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs b/src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs index 3a991e007af..40310970348 100644 --- a/src/tools/rust-analyzer/crates/ide-completion/src/completions/dot.rs +++ b/src/tools/rust-analyzer/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 +} +"#, + ); } } |
