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

20 lines
365 B
Rust
Raw Normal View History

// xfail-stage0
// xfail-stage1
// xfail-stage2
// xfail-stage3
2010-06-23 23:03:09 -05:00
// -*- rust -*-
use std;
type cell = tup(mutable @list);
tag list { link(@cell); nil; }
2010-06-23 23:03:09 -05:00
fn main() {
let @cell first = @tup(mutable @nil());
let @cell second = @tup(mutable @link(first));
first._0 = @link(second);
std::sys.rustrt.gc();
let @cell third = @tup(mutable @nil());
}