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

use std;

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

fn main() {
  let @cell first = @tup(mutable @nil());
  let @cell second = @tup(mutable @link(first));
  first._0 = @link(second);
  std.sys.rustrt.gc();
  let @cell third = @tup(mutable @nil());
}