On 11-06-03 01:51 PM, Patrick Walton wrote:
Thoughts?
I like the line of reasoning; let me try phrasing in a slightly more
terse/pithy fashion:
"Alias-formation must preserve unique ownership of the referent"
IOW an alias is assumed to be a form of unique access to its immediate
referent (handed off from caller to callee temporarily during a function
call) and you cannot form aliases to things you reached through a shared
pointer edge. That referent can contain shared edges out into the heap,
but the alias *itself* is "a stack-disciplined unique pointer" to its
immediate referent.
Is this sufficient? You can alias a substructure only if you reach it
through unique ownership lvals (either interior or a unique pointer).
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev