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

10 lines
177 B
Rust
Raw Normal View History

2012-03-26 20:35:18 -05:00
type foo = { mut z : fn@() };
2011-10-21 17:06:02 -05:00
fn nop() { }
fn nop_foo(_y: [int], _x : @foo) { }
fn main() {
2012-03-26 20:35:18 -05:00
let w = @{ mut z: bind nop() };
2011-10-21 17:06:02 -05:00
let x = bind nop_foo([], w);
w.z = x;
}