1 // Test that opaque `impl Trait` types are allowed to contain late-bound regions.
6 #![feature(type_alias_impl_trait)]
8 use std::future::Future;
10 pub type Func = impl Sized;
12 // Late bound region should be allowed to escape the function, since it's bound
14 fn null_function_ptr() -> Func {
15 None::<for<'a> fn(&'a ())>
18 async fn async_nop(_: &u8) {}
20 pub type ServeFut = impl Future<Output=()>;
22 // Late bound regions occur in the generator witness type here.
23 fn serve() -> ServeFut {