// run-pass pub trait FakeCoroutine { type Yield; type Return; } pub trait FakeFuture { type Output; } pub fn future_from_coroutine< T: FakeCoroutine >(x: T) -> impl FakeFuture { GenFuture(x) } struct GenFuture>(#[allow(unused_tuple_struct_fields)] T); impl> FakeFuture for GenFuture { type Output = T::Return; } fn main() {}