Skip to content

Commit 0ad9d95

Browse files
committed
---
yaml --- r: 31066 b: refs/heads/incoming c: 2f50607 h: refs/heads/master v: v3
1 parent dcbf37c commit 0ad9d95

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: df98cb8e884e7546b83ee229975759deb948e05a
9+
refs/heads/incoming: 2f50607d8840d2ea7de6a7367ab9854d6951e889
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,20 +2733,17 @@ the box values pointing to it. Since box values may themselves be passed in
27332733
and out of frames, or stored in the heap, heap allocations may outlive the
27342734
frame they are allocated within.
27352735

2736-
27372736
### Memory ownership
27382737

27392738
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.
27502747

27512748
When a stack frame is exited, its local allocations are all released, and its
27522749
references to boxes (both shared and owned) are dropped.

0 commit comments

Comments
 (0)