use std::{ pin::Pin, task::{Context, Poll}, }; trait FnOnce1 { type Output; } impl FnOnce1 for T where T: FnOnce() -> R, { type Output = R; } struct Map(F); impl Future for Map where F: FnOnce1, { type Output = T; fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll { loop {} } } fn take_output(_: Pin<&mut Fut>) -> Fut::Output { loop {} } fn main() { let mut bazz = Map(async || ()); let mut barr = async { Bazz {} }; let mut _fut0 = unsafe { Pin::new_unchecked(&mut bazz) }; let mut _fut1 = unsafe { Pin::new_unchecked(&mut barr) }; || { take_output(_fut0.as_mut()); take_output(_fut1.as_mut()); }; } // 1 // 2 #[derive(proc_macro_thing::MyMacro)] #[helper] struct Bazz {}