about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2012-10-05 15:48:28 -0700
committerGraydon Hoare <graydon@mozilla.com>2012-10-05 19:06:25 -0700
commit2f50607d8840d2ea7de6a7367ab9854d6951e889 (patch)
treec7315b2e62420d2209b54a4b8b1f8057f6f05b76
parentdf98cb8e884e7546b83ee229975759deb948e05a (diff)
Reword memory-ownership section.
-rw-r--r--doc/rust.md19
1 files changed, 8 insertions, 11 deletions
diff --git a/doc/rust.md b/doc/rust.md
index 31b734b9f6d..b9eb633743f 100644
--- a/doc/rust.md
+++ b/doc/rust.md
@@ -2733,20 +2733,17 @@ the box values pointing to it. Since box values may themselves be passed in
 and out of frames, or stored in the heap, heap allocations may outlive the
 frame they are allocated within.
 
-
 ### Memory ownership
 
 A task owns all memory it can *safely* reach through local variables,
-shared or unique boxes, and/or references. Sharing memory between tasks can
-only be accomplished using *unsafe* constructs, such as raw pointer
-operations or calling C code.
-
-When a task sends a value that has the `send` trait over a channel, it
-loses ownership of the value sent and can no longer refer to it. This is
-statically guaranteed by the combined use of "move semantics" and the
-compiler-checked _meaning_ of the `send` trait: it is only instantiated
-for (transitively) unique kinds of data constructor and pointers, never shared
-pointers.
+as well as managed, owning and borrowed pointers.
+
+When a task sends a value that has the `Send` trait to another task,
+it loses ownership of the value sent and can no longer refer to it.
+This is statically guaranteed by the combined use of "move semantics",
+and the compiler-checked _meaning_ of the `Send` trait:
+it is only instantiated for (transitively) sendable kinds of data constructor and pointers,
+never including managed or borrowed pointers.
 
 When a stack frame is exited, its local allocations are all released, and its
 references to boxes (both shared and owned) are dropped.