Skip to content

Commit a44852a

Browse files
committed
Update Owned to Send, show some types which aren't
1 parent 888144c commit a44852a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

doc/tutorial.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,11 +922,15 @@ let mut b = Foo { x: 5, y: ~10 };
922922
b.x = 10;
923923
~~~~
924924

925-
If an object doesn't contain garbage-collected boxes, it consists of a single
926-
ownership tree and is given the `Owned` trait which allows it to be sent
925+
If an object doesn't contain any non-Send types, it consists of a single
926+
ownership tree and is itself given the `Send` trait which allows it to be sent
927927
between tasks. Custom destructors can only be implemented directly on types
928-
that are `Owned`, but garbage-collected boxes can still *contain* types with
929-
custom destructors.
928+
that are `Send`, but non-`Send` types can still *contain* types with custom
929+
destructors. Example of types which are not `Send` are [`Gc<T>`][gc] and
930+
[`Rc<T>`][rc], the shared-ownership types.
931+
932+
[gc]: http://static.rust-lang.org/doc/master/std/gc/struct.Gc.html
933+
[rc]: http://static.rust-lang.org/doc/master/std/rc/struct.Rc.html
930934

931935
# Implementing a linked list
932936

0 commit comments

Comments
 (0)