//@ 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(dead_code)] T); impl> FakeFuture for GenFuture { type Output = T::Return; } fn main() {}