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