mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
13 lines
247 B
Rust
13 lines
247 B
Rust
fn ignore<F>(_f: F) where F: for<'z> FnOnce(&'z isize) -> &'z isize {}
|
|
|
|
fn nested() {
|
|
let y = 3;
|
|
ignore(
|
|
|z| {
|
|
if false { &y } else { z }
|
|
//~^ ERROR `y` does not live long enough
|
|
});
|
|
}
|
|
|
|
fn main() {}
|