Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/unimplemented_trait.rs')
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/unimplemented_trait.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ide-diagnostics/src/handlers/unimplemented_trait.rs b/crates/ide-diagnostics/src/handlers/unimplemented_trait.rs index 4326aec458..bacf273f76 100644 --- a/crates/ide-diagnostics/src/handlers/unimplemented_trait.rs +++ b/crates/ide-diagnostics/src/handlers/unimplemented_trait.rs @@ -50,4 +50,23 @@ fn bar() { "#, ); } + + #[test] + fn async_closure_does_not_trigger() { + check_diagnostics( + r#" +//- minicore: async_fn +fn spawn_in<AsyncFn>(_f: AsyncFn) +where + AsyncFn: AsyncFnOnce(), +{ +} + +fn foo() { + spawn_in(async move || {}); +} + + "#, + ); + } } |