2011-06-15 11:19:50 -07:00
|
|
|
|
|
|
|
|
2011-03-25 12:19:20 -07:00
|
|
|
// xfail-stage0
|
2011-05-03 18:13:51 -07:00
|
|
|
// xfail-stage1
|
|
|
|
// xfail-stage2
|
2011-07-20 19:37:09 -07:00
|
|
|
// xfail-stage3
|
2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
2010-06-25 23:57:30 -07:00
|
|
|
use std;
|
|
|
|
|
2011-07-27 14:19:39 +02:00
|
|
|
type cell = {mutable c: @list};
|
2011-06-15 11:19:50 -07:00
|
|
|
|
|
|
|
tag list { link(@cell); nil; }
|
2010-06-23 21:03:09 -07:00
|
|
|
|
|
|
|
fn main() {
|
2011-07-27 14:19:39 +02:00
|
|
|
let first: @cell = @{mutable c: @nil()};
|
|
|
|
let second: @cell = @{mutable c: @link(first)};
|
2011-06-15 11:19:50 -07:00
|
|
|
first._0 = @link(second);
|
|
|
|
std::sys.rustrt.gc();
|
2011-07-27 14:19:39 +02:00
|
|
|
let third: @cell = @{mutable c: @nil()};
|
2011-06-15 11:19:50 -07:00
|
|
|
}
|