rust/src/test/ui/regions/regions-nested-fns-2.rs

13 lines
223 B
Rust
Raw Normal View History

fn ignore<F>(_f: F) where F: for<'z> FnOnce(&'z isize) -> &'z isize {}
fn nested() {
let y = 3;
ignore(
2016-08-05 12:53:14 -05:00
|z| {
//~^ ERROR E0373
if false { &y } else { z }
});
}
fn main() {}