aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/mlist-cycle.rs
blob: 09221ea3e2c2a3fc00c890f63735d88579fc12c9 (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(mutable @nil());
  let @cell second = @tup(mutable @link(first));
  first._0 = @link(second);
  std.sys.rustrt.gc();
  let @cell third = @tup(mutable @nil());
}