/src/test/run-pass/mlist-cycle.rs
Rust | 15 lines | 10 code | 3 blank | 2 comment | 0 complexity | aea9d5fb31c3b1f78971b39363437e90 MD5 | raw file
1// xfail-test 2// -*- rust -*- 3use std; 4 5type cell = {mut c: @list}; 6 7enum list { link(@cell), nil, } 8 9fn main() { 10 let first: @cell = @{mut c: @nil()}; 11 let second: @cell = @{mut c: @link(first)}; 12 first._0 = @link(second); 13 sys.rustrt.gc(); 14 let third: @cell = @{mut c: @nil()}; 15}