rust/src/test/compile-fail/regions-nested-fns-2.rs
2012-08-01 19:16:06 -07:00

11 lines
189 B
Rust

fn ignore<T>(_t: T) {}
fn nested() {
let y = 3;
ignore(fn&(z: &z/int) -> &z/int {
if false { return &y; } //~ ERROR illegal borrow
return z;
});
}
fn main() {}