//Compiled #![feature(type_alias_impl_trait)] #![feature(generic_associated_types)] use async_trait_static::async_trait; use std::boxed::Box; #[async_trait] trait AsyncFnTrait { async fn run(s: Box); } struct AsyncStruct; impl AsyncStruct { async fn hello(&self) -> u8 { 1 } } #[async_trait] impl AsyncFnTrait for AsyncStruct { async fn run(s: Box) { s.hello().await; } } fn main() {}