dtolnay / async-trait

Type erasure for async trait methods
Apache License 2.0
1.84k stars 85 forks source link

the size for values of type `Self` cannot be known at compilation time #135

Closed PonasKovas closed 3 years ago

PonasKovas commented 3 years ago

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f1ef3f4e382da8479816df9be24399c1

taiki-e commented 3 years ago

This is not an async-trait-specific issue. Self needs to be Sized to define a trait method that returns Self. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=7d562b9a2880ae6c167b2588caea4098