News for hackers. Stuff that matters.
Re:Announcing Rust 1.20 by GolDDranks on Thursday August 31, 2017 @11:31PM (#15145909)
In a sense, they solve the cycle problem in Rust. The trick is that once something is allocated to an arena, it has the same lifetime as the whole arena, and that allows cyclical links because none of the nodes "outlive each other".

However, you must have interior mutability (achieved using Cell types), because otherwise you can't mutate the parent nodes to add links to child nodes.

Check the typed arena crate in crates.io and the Cell type in the standard library.

There are no comments on this comment yet.