aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass/mlist-cycle.rs
blob: 7a884e41f438c2e115c130d6b1ac6e4363676087 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// xfail-boot
// xfail-stage0
// xfail-stage1
// xfail-stage2
// -*- 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());
}