4 ms·
My understanding is that `async fn` in a trait is desugared to `fn() -> impl Future` just like it would be anywhere else, so there's no unsized types involved.
by SpaghettiCthulu 4y ago
My understanding is that `async fn` in a trait is desugared to `fn() -> impl Future` just like it would be anywhere else, so there's no unsized types involved.
- pitaj 4y agoIt's actually desugared to a generic associated type: trait Foo { type bar_Returns<'s>: Future<Output = Result<u64, ()>> where Self: 's; fn bar<'s>(&'s self) -> Self::bar_Returns<'s>; }