1 // Regression test for issue 57464.
3 // Closure are (surprisingly) allowed to outlive their signature. As such it
4 // was possible to end up with `ReScope`s appearing in the concrete type of an
5 // opaque type. As all regions are now required to outlive the bound in an
6 // opaque type we avoid the issue here.
12 unsafe impl <'a, 'b, F: Fn(&'a i32) -> &'b i32> Send for A<F> {}
14 fn wrapped_closure() -> impl Sized {
20 fn wrapped_closure_with_bound() -> impl Sized + 'static {
27 let x: Box<dyn Send> = Box::new(wrapped_closure());
28 let y: Box<dyn Send> = Box::new(wrapped_closure_with_bound());