2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2010-06-26 01:57:30 -05:00
|
|
|
use std;
|
|
|
|
|
2010-06-24 20:25:10 -05:00
|
|
|
type cell = tup(mutable @list);
|
2010-09-09 17:59:29 -05:00
|
|
|
tag list {
|
|
|
|
link(@cell);
|
|
|
|
nil();
|
|
|
|
}
|
2010-06-23 23:03:09 -05:00
|
|
|
|
|
|
|
fn main() {
|
2010-07-22 19:05:45 -05:00
|
|
|
let @cell first = @tup(mutable @nil());
|
|
|
|
let @cell second = @tup(mutable @link(first));
|
2010-07-13 16:27:23 -05:00
|
|
|
first._0 = @link(second);
|
2010-06-26 01:57:30 -05:00
|
|
|
std.sys.rustrt.gc();
|
2010-07-22 19:05:45 -05:00
|
|
|
let @cell third = @tup(mutable @nil());
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|