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

10 lines
170 B
Rust

type foo = { mutable z : fn@() };
fn nop() { }
fn nop_foo(_x : @foo) { }
fn main() {
let w = @{ mutable z: bind nop() };
let x = bind nop_foo(w);
w.z = x;
}