Steven Blenkinsop wrote:
If either of these is the case, then the update/replace function wouldn't be safe either, since f could read v.l indirectly after v.l has been moved into f, breaking uniqueness guarantees.

There are other ways to have aliases as well, for example as part of a closure. But you're correct, the function I proposed wouldn't be safe. Not sure what I was thinking. In any case, the other technique I mentioned works just fine (swapping with None or what have you).


Niko
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to