2013-11-18 17:40:54 -08:00
|
|
|
fn call_f(f: proc() -> int) -> int {
|
2013-07-17 07:19:43 -04:00
|
|
|
f()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let t = ~3;
|
|
|
|
|
2013-11-21 23:36:52 -08:00
|
|
|
call_f(proc() { *t + 1 });
|
|
|
|
call_f(proc() { *t + 1 }); //~ ERROR capture of moved value
|
2013-07-17 07:19:43 -04:00
|
|
|
}
|