@@ -2740,11 +2740,11 @@ The kinds are:
2740
2740
` Const `
2741
2741
: Types of this kind are deeply immutable;
2742
2742
they contain no mutable memory locations directly or indirectly via pointers.
2743
- ` Send `
2743
+ ` Owned `
2744
2744
: Types of this kind can be safely sent between tasks.
2745
2745
This kind includes scalars, owning pointers, owned closures, and
2746
- structural types containing only other sendable types.
2747
- ` Owned `
2746
+ structural types containing only other owned types. All ` Owned ` types are ` Static ` .
2747
+ ` Static `
2748
2748
: Types of this kind do not contain any borrowed pointers;
2749
2749
this can be a useful guarantee for code that breaks borrowing assumptions using [ ` unsafe ` operations] ( #unsafe-functions ) .
2750
2750
` Copy `
@@ -2833,10 +2833,10 @@ frame they are allocated within.
2833
2833
A task owns all memory it can * safely* reach through local variables,
2834
2834
as well as managed, owning and borrowed pointers.
2835
2835
2836
- When a task sends a value that has the ` Send ` trait to another task,
2836
+ When a task sends a value that has the ` Owned ` trait to another task,
2837
2837
it loses ownership of the value sent and can no longer refer to it.
2838
2838
This is statically guaranteed by the combined use of "move semantics",
2839
- and the compiler-checked _ meaning_ of the ` Send ` trait:
2839
+ and the compiler-checked _ meaning_ of the ` Owned ` trait:
2840
2840
it is only instantiated for (transitively) sendable kinds of data constructor and pointers,
2841
2841
never including managed or borrowed pointers.
2842
2842
@@ -2971,7 +2971,7 @@ These include:
2971
2971
- read-only and read-write shared variables with various safe mutual exclusion patterns
2972
2972
- simple locks and semaphores
2973
2973
2974
- When such facilities carry values, the values are restricted to the [ ` Send ` type-kind] ( #type-kinds ) .
2974
+ When such facilities carry values, the values are restricted to the [ ` Owned ` type-kind] ( #type-kinds ) .
2975
2975
Restricting communication interfaces to this kind ensures that no borrowed or managed pointers move between tasks.
2976
2976
Thus access to an entire data structure can be mediated through its owning "root" value;
2977
2977
no further locking or copying is required to avoid data races within the substructure of such a value.
0 commit comments