@@ -1144,9 +1144,9 @@ standard library.
1144
1144
Rust's type system is a conservative approximation of the dynamic safety
1145
1145
requirements, so in some cases there is a performance cost to using safe code.
1146
1146
For example, a doubly-linked list is not a tree structure and can only be
1147
- represented with managed or reference-counted pointers in safe code. By using
1148
- ` unsafe ` blocks to represent the reverse links as raw pointers, it can be
1149
- implemented with only owned pointers .
1147
+ represented with reference-counted pointers in safe code. By using ` unsafe `
1148
+ blocks to represent the reverse links as raw pointers, it can be implemented
1149
+ with only boxes .
1150
1150
1151
1151
##### Behavior considered unsafe
1152
1152
@@ -2216,8 +2216,6 @@ These types help drive the compiler's analysis
2216
2216
2217
2217
* ` begin_unwind `
2218
2218
: ___ Needs filling in___
2219
- * ` managed_bound `
2220
- : This type implements "managed"
2221
2219
* ` no_copy_bound `
2222
2220
: This type does not implement "copy", even if eligible
2223
2221
* ` no_send_bound `
@@ -2242,8 +2240,6 @@ These types help drive the compiler's analysis
2242
2240
: ___ Needs filling in___
2243
2241
* ` exchange_heap `
2244
2242
: ___ Needs filling in___
2245
- * ` managed_heap `
2246
- : ___ Needs filling in___
2247
2243
* ` iterator `
2248
2244
: ___ Needs filling in___
2249
2245
* ` contravariant_lifetime `
@@ -2472,13 +2468,6 @@ The currently implemented features of the reference compiler are:
2472
2468
likely to change slightly in the future, so they are
2473
2469
currently hidden behind this feature.
2474
2470
2475
- * ` managed_boxes ` - Usage of ` @ ` is gated due to many
2476
- planned changes to this feature. In the past, this has
2477
- meant "a GC pointer", but the current implementation uses
2478
- reference counting and will likely change drastically over
2479
- time. Additionally, the ` @ ` syntax will no longer be used
2480
- to create GC boxes.
2481
-
2482
2471
* ` non_ascii_idents ` - The compiler supports the use of non-ascii identifiers,
2483
2472
but the implementation is a little rough around the
2484
2473
edges, so this can be seen as an experimental feature
@@ -3949,33 +3938,24 @@ A task's _stack_ consists of activation frames automatically allocated on entry
3949
3938
to each function as the task executes. A stack allocation is reclaimed when
3950
3939
control leaves the frame containing it.
3951
3940
3952
- The _ heap_ is a general term that describes two separate sets of boxes: managed
3953
- boxes &mdash ; which may be subject to garbage collection &mdash ; and boxes. The
3954
- lifetime of an allocation in the heap depends on the lifetime of the box values
3955
- pointing to it. Since box values may themselves be passed in and out of frames,
3956
- or stored in the heap, heap allocations may outlive the frame they are
3957
- allocated within.
3941
+ The _ heap_ is a general term that describes boxes. The lifetime of an
3942
+ allocation in the heap depends on the lifetime of the box values pointing to
3943
+ it. Since box values may themselves be passed in and out of frames, or stored
3944
+ in the heap, heap allocations may outlive the frame they are allocated within.
3958
3945
3959
3946
### Memory ownership
3960
3947
3961
3948
A task owns all memory it can * safely* reach through local variables, as well
3962
- as managed, boxes and references.
3949
+ as boxes and references.
3963
3950
3964
3951
When a task sends a value that has the ` Send ` trait to another task, it loses
3965
3952
ownership of the value sent and can no longer refer to it. This is statically
3966
3953
guaranteed by the combined use of "move semantics", and the compiler-checked
3967
3954
_ meaning_ of the ` Send ` trait: it is only instantiated for (transitively)
3968
- sendable kinds of data constructor and pointers, never including managed boxes
3969
- or references.
3955
+ sendable kinds of data constructor and pointers, never including references.
3970
3956
3971
3957
When a stack frame is exited, its local allocations are all released, and its
3972
- references to boxes (both managed and owned) are dropped.
3973
-
3974
- A managed box may (in the case of a recursive, mutable managed type) be cyclic;
3975
- in this case the release of memory inside the managed structure may be deferred
3976
- until task-local garbage collection can reclaim it. Code can ensure no such
3977
- delayed deallocation occurs by restricting itself to owned boxes and similar
3978
- unmanaged kinds of data.
3958
+ references to boxes are dropped.
3979
3959
3980
3960
When a task finishes, its stack is necessarily empty and it therefore has no
3981
3961
references to any boxes; the remainder of its heap is immediately freed.
@@ -4052,10 +4032,10 @@ races on memory are prohibited by the type system.
4052
4032
4053
4033
When you wish to send data between tasks, the values are restricted to the
4054
4034
[ ` Send ` type-kind] ( #type-kinds ) . Restricting communication interfaces to this
4055
- kind ensures that no references or managed pointers move between tasks. Thus
4056
- access to an entire data structure can be mediated through its owning "root"
4057
- value; no further locking or copying is required to avoid data races within the
4058
- substructure of such a value.
4035
+ kind ensures that no references move between tasks. Thus access to an entire
4036
+ data structure can be mediated through its owning "root" value; no further
4037
+ locking or copying is required to avoid data races within the substructure of
4038
+ such a value.
4059
4039
4060
4040
### Task lifecycle
4061
4041
0 commit comments