2 trait Future: 'static {
3 // The requirement for Self: Sized must prevent instantiation of
4 // Future::forget in vtables, otherwise there's an infinite type
5 // recursion through <Map<...> as Future>::forget.
6 fn forget(self) where Self: Sized {
7 Box::new(Map(self)) as Box<dyn Future>;
12 impl<A: Future> Future for Map<A> {}
15 impl Future for Promise {}