2 // Example taken from RFC 1238 text
4 // https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md
5 // #examples-of-code-that-must-continue-to-work
9 struct Concrete<'a>(u32, Cell<Option<&'a Concrete<'a>>>);
11 struct Foo<T> { data: Vec<T> }
14 let mut foo = Foo { data: Vec::new() };
15 foo.data.push(Concrete(0, Cell::new(None)));
16 foo.data.push(Concrete(0, Cell::new(None)));
18 foo.data[0].1.set(Some(&foo.data[1]));
19 foo.data[1].1.set(Some(&foo.data[0]));