Skip to content

Commit 90ca03e

Browse files
committed
---
yaml --- r: 24466 b: refs/heads/master c: 2f50607 h: refs/heads/master v: v3
1 parent b67b098 commit 90ca03e

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: df98cb8e884e7546b83ee229975759deb948e05a
2+
refs/heads/master: 2f50607d8840d2ea7de6a7367ab9854d6951e889
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/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)