Closed
Description
The following testcase crashes at runtime when call_f is called the second time. It appears rustc accepts to move the value t into "both" heap closures.
fn call_f(f: ~fn:Owned() -> int) -> int {
f()
}
fn main() {
let t = ~3;
call_f(|| { *t + 1 });
call_f(|| { *t + 1 });
}
Tested with version f1e09d6 / rustc 0.6 (f1e09d6 2013-06-26 23:07:41 -0700)
Assign to @bblum