Since swap seems to have its own problems - would it be possible to tweak the stealing idea so the compiler would know there's a burrowed mutable pointer to the hole, effectively preventing further access to it in the vulnerable block?
I really would like to be able to use this approach, it really improved my code... On Sat, Aug 31, 2013 at 3:50 AM, Patrick Walton <[email protected]> wrote: > On 8/30/13 3:39 PM, Patrick Walton wrote: > >> Thoughts? Does this seem useful? Are there soundness issues I didn't >> notice? >> > > Brian pointed out a massive soundness hole in this, unfortunately. The > problem is that you can read from the original locations; the right to read > is not "shut off" during the borrow. I think the fix would have to be to > replace this with some sort of "generalized swap" operation. > > > Patrick > > ______________________________**_________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/**listinfo/rust-dev<https://mail.mozilla.org/listinfo/rust-dev> >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
