//Compiled #![feature(type_alias_impl_trait)] #![feature(generic_associated_types)] use async_trait_static::ritit; #[ritit] trait AsyncFnTrait { fn run(&self, t: T) -> impl core::future::Future; fn deff(&self) -> impl core::future::Future { async move { 1 } } } struct AsyncStruct; impl AsyncStruct { async fn hello(&self) -> u8 { 1 } } #[ritit] impl AsyncFnTrait for AsyncStruct { fn run(&self, t: T) -> impl core::future::Future { async move { self.hello().await; } } } fn main() {}