1 // Similar to regions-ret-borrowed.rs, but using a named lifetime. At
2 // some point regions-ret-borrowed reported an error but this file did
3 // not, due to special hardcoding around the anonymous region.
5 fn with<R, F>(f: F) -> R where F: for<'a> FnOnce(&'a isize) -> R {
9 fn return_it<'a>() -> &'a isize {
11 //~^ ERROR lifetime may not live long enough
16 println!("foo={}", *x);