rust/src/test/run-pass/mlist-cycle.rs

15 lines
312 B
Rust
Raw Normal View History

// xfail-test
2010-06-23 21:03:09 -07:00
// -*- rust -*-
use std;
2011-07-27 14:19:39 +02:00
type cell = {mutable c: @list};
enum 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)};
first._0 = @link(second);
sys.rustrt.gc();
2011-07-27 14:19:39 +02:00
let third: @cell = @{mutable c: @nil()};
}