aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/mlist-cycle.rs
blob: 313455f8e683ac9ed619a7274d328668f1b5528a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// -*- rust -*-

use std;

type cell = tup(mutable @list);
type list = tag(link(@cell), nil());

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());
}