1 #![feature(type_alias_impl_trait)]
4 // compile-flags: --crate-type=lib
6 use std::future::Future;
12 type FooFuture<B> = impl Future<Output = ()>;
14 fn foo<B: Bar>(bar: B) -> FooFuture<B> {
15 async move { bar.bar() }
16 //~^ ERROR: the trait bound `B: Bar` is not satisfied
19 pub fn mainish(ctx: &mut std::task::Context) {
20 let boom: FooFuture<u32> = unsafe { core::mem::zeroed() };
21 Box::pin(boom).as_mut().poll(ctx);