2013-06-20 14:11:47 -05:00
|
|
|
fn arg_item(~ref x: ~int) -> &'static int {
|
|
|
|
x //~^ ERROR borrowed value does not live long enough
|
|
|
|
}
|
|
|
|
|
2013-11-19 18:34:19 -06:00
|
|
|
fn with<R>(f: |~int| -> R) -> R { f(~3) }
|
2013-06-20 14:11:47 -05:00
|
|
|
|
|
|
|
fn arg_closure() -> &'static int {
|
|
|
|
with(|~ref x| x) //~ ERROR borrowed value does not live long enough
|
|
|
|
}
|
|
|
|
|
2013-09-23 19:20:36 -05:00
|
|
|
fn main() {}
|