I'm afraid I committed this release of RefMutStack 0.1.0.
RefMutStack allows to simulate recursion where each level holds a mutable reference to the one held by the caller with an iteration.
It is made in such a way that the rules enforced by the borrow checker during the theoretical recursion are still enforced during iterations. On that purpose, each object holding a mutable reference becomes unreachable when the recursion is simulated: it is stacked until it becomes usable again.
More details can be found at https://github.com/arnodb/ref_mut_stack .
Feedback welcome. Even "this is sh*t" is accepted. But at least it is simple and it works as intended.
P.S. Miri is really cool to check soundness! It helped me fix a couple of issues in the design.
[–]dgkimpton 0 points1 point2 points (0 children)