blob: 4848262750720fc61766f40f9f48786ab25e2e1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
fn arg_item(~ref x: ~int) -> &'static int {
x //~^ ERROR borrowed value does not live long enough
}
fn with<R>(f: &fn(~int) -> R) -> R { f(~3) }
fn arg_closure() -> &'static int {
with(|~ref x| x) //~ ERROR borrowed value does not live long enough
}
fn main() {}
|