rust/src/test/run-pass/cycle-collection2.rs

10 lines
160 B
Rust
Raw Normal View History

2012-03-26 20:35:18 -05:00
type foo = { mut z : fn@() };
fn nop() { }
fn nop_foo(_x : @foo) { }
fn main() {
2012-06-19 21:34:01 -05:00
let w = @{ mut z: {||nop()} };
let x = {||nop_foo(w)};
w.z = x;
}