1 // Test that opaque `impl Trait` types are allowed to contain late-bound regions.
6 // revisions: min_tait full_tait
7 #![feature(min_type_alias_impl_trait)]
8 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
9 //[full_tait]~^ WARN incomplete
11 use std::future::Future;
13 pub type Func = impl Sized;
15 // Late bound region should be allowed to escape the function, since it's bound
17 fn null_function_ptr() -> Func {
18 None::<for<'a> fn(&'a ())>
21 async fn async_nop(_: &u8) {}
23 pub type ServeFut = impl Future<Output=()>;
25 // Late bound regions occur in the generator witness type here.
26 fn serve() -> ServeFut {