From: bors Date: Wed, 11 Jun 2014 01:07:07 +0000 (-0700) Subject: auto merge of #14768 : riccieri/rust/detransmute-arena, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=f92a8facf90b40a483032cedb98decc8c41bde51;p=rust.git auto merge of #14768 : riccieri/rust/detransmute-arena, r=alexcrichton **Update** I've reimplemented this using `Cell` and `RefCell`, as suggested by @alexcrichton. By taking care with the duration of the borrows, I was able to maintain the recursive allocation feature (now covered by a test) without the use of `Unsafe`, and without breaking the non-aliasing `&mut` invariant. **Original** Changes both `Arena` and `TypedArena` to contain an inner struct wrapped in a `Unsafe`, and change field access to go through those instead of transmuting `&self` to `&mut self`. Part of #13933 --- f92a8facf90b40a483032cedb98decc8c41bde51