@@ -2733,20 +2733,17 @@ the box values pointing to it. Since box values may themselves be passed in
2733
2733
and out of frames, or stored in the heap, heap allocations may outlive the
2734
2734
frame they are allocated within.
2735
2735
2736
-
2737
2736
### Memory ownership
2738
2737
2739
2738
A task owns all memory it can * safely* reach through local variables,
2740
- shared or unique boxes, and/or references. Sharing memory between tasks can
2741
- only be accomplished using * unsafe* constructs, such as raw pointer
2742
- operations or calling C code.
2743
-
2744
- When a task sends a value that has the ` send ` trait over a channel, it
2745
- loses ownership of the value sent and can no longer refer to it. This is
2746
- statically guaranteed by the combined use of "move semantics" and the
2747
- compiler-checked _ meaning_ of the ` send ` trait: it is only instantiated
2748
- for (transitively) unique kinds of data constructor and pointers, never shared
2749
- pointers.
2739
+ as well as managed, owning and borrowed pointers.
2740
+
2741
+ When a task sends a value that has the ` Send ` trait to another task,
2742
+ it loses ownership of the value sent and can no longer refer to it.
2743
+ This is statically guaranteed by the combined use of "move semantics",
2744
+ and the compiler-checked _ meaning_ of the ` Send ` trait:
2745
+ it is only instantiated for (transitively) sendable kinds of data constructor and pointers,
2746
+ never including managed or borrowed pointers.
2750
2747
2751
2748
When a stack frame is exited, its local allocations are all released, and its
2752
2749
references to boxes (both shared and owned) are dropped.
0 commit comments