/src/test/run-pass/mlist-cycle.rs
http://github.com/jruderman/rust · Rust · 15 lines · 10 code · 3 blank · 2 comment · 0 complexity · aea9d5fb31c3b1f78971b39363437e90 MD5 · raw file
- // xfail-test
- // -*- rust -*-
- use std;
- type cell = {mut c: @list};
- enum list { link(@cell), nil, }
- fn main() {
- let first: @cell = @{mut c: @nil()};
- let second: @cell = @{mut c: @link(first)};
- first._0 = @link(second);
- sys.rustrt.gc();
- let third: @cell = @{mut c: @nil()};
- }