4 use core::future::Future;
7 pub type BoxFuture<'a, T> = Pin<Box<dyn Future<Output = T> + Send + 'a>>;
9 impl<T: ?Sized> FutureExt for T where T: Future {}
10 trait FutureExt: Future {
11 fn boxed<'a>(self) -> BoxFuture<'a, Self::Output>
13 Self: Sized + Send + 'a,
20 let _: BoxFuture<'static, bool> = async {}.boxed();
21 //~^ ERROR: mismatched types