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

15 lines
267 B
Rust
Raw Normal View History

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