1 fn borrowed_proc<'a>(x: &'a isize) -> Box<dyn FnMut()->(isize) + 'a> {
2 // This is legal, because the region bound on `proc`
3 // states that it captures `x`.
4 Box::new(move|| { *x })
7 fn static_proc(x: &isize) -> Box<dyn FnMut() -> (isize) + 'static> {
8 // This is illegal, because the region bound on `proc` is 'static.
9 Box::new(move || { *x }) //~ ERROR E0759