Rust: Model async return types as dyn Future

This commit is contained in:
Tom Hvitved
2025-08-17 16:40:19 +02:00
parent 982950ffc6
commit a9b58b8db3
3 changed files with 31 additions and 19 deletions

View File

@@ -0,0 +1,6 @@
// Type mentions required by type inference
use std::future::Future;
fn mention_dyn_future<T>(f: &dyn Future<Output = T>) {}
fn mention_dyn_fn_once<F>(f: &dyn FnOnce() -> F) {}