2011-08-31 13:22:58 +02:00
|
|
|
// xfail-test
|
2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
2010-06-25 23:57:30 -07:00
|
|
|
use std;
|
|
|
|
|
2012-03-26 18:35:18 -07:00
|
|
|
type cell = {mut c: @list};
|
2011-06-15 11:19:50 -07:00
|
|
|
|
2012-01-19 18:31:08 -08:00
|
|
|
enum list { link(@cell), nil, }
|
2010-06-23 21:03:09 -07:00
|
|
|
|
|
|
|
fn main() {
|
2012-03-26 18:35:18 -07:00
|
|
|
let first: @cell = @{mut c: @nil()};
|
|
|
|
let second: @cell = @{mut c: @link(first)};
|
2011-06-15 11:19:50 -07:00
|
|
|
first._0 = @link(second);
|
2011-12-13 16:25:51 -08:00
|
|
|
sys.rustrt.gc();
|
2012-03-26 18:35:18 -07:00
|
|
|
let third: @cell = @{mut c: @nil()};
|
2011-06-15 11:19:50 -07:00
|
|
|
}
|