4 ms·
> async fn and return-position impl Trait in traits Does this get rid of this: https://crates.io/crates/async-trait https://crates.io/crates/async-trait ?
by MuffinFlavored 3y ago
> async fn and return-position impl Trait in traits
Does this get rid of this: https://crates.io/crates/async-trait https://crates.io/crates/async-trait ?
- pkolaczk 3y agoYes
- demurgos 3y agoYes if you use generics, no if you use trait objects (`dyn Trait`). These new features are implemented similarly to a hidden associated type and are not object-safe. There were some discussions about object safety, but it's a tough issue to fix while remaining explicit about allocations.