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

11 lines
201 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
type cell = tup(mutable @list);
type list = tag(link(@cell), nil());
2010-06-23 23:03:09 -05:00
fn main() {
let @cell first = tup(@nil());
let @cell second = tup(@link(first));
first._0 = link(second);
2010-06-23 23:03:09 -05:00
}