Skip to content

Commit 9400c74

Browse files
committed
---
yaml --- r: 10671 b: refs/heads/snap-stage3 c: 60a748a h: refs/heads/master i: 10669: b99b4bd 10667: 9390eb3 10663: 1d070be 10655: bb0db93 v: v3
1 parent 8c20a2b commit 9400c74

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 588c1eb41ff88efe3cc971f341d6f866f66dd62c
4+
refs/heads/snap-stage3: 60a748a1d8e9631df9b04235881917c0a80c9e03
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/doc/tutorial.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,26 +1377,7 @@ Like vectors, strings are always unique. You can wrap them in a shared
13771377
box to share them. Unlike vectors, there is no mutable variant of
13781378
strings. They are always immutable.
13791379
1380-
## Resources
1381-
1382-
Resources are data types that have a destructor associated with them.
1383-
1384-
~~~~
1385-
# fn close_file_desc(x: int) {}
1386-
resource file_desc(fd: int) {
1387-
close_file_desc(fd);
1388-
}
1389-
~~~~
1390-
1391-
This defines a type `file_desc` and a constructor of the same name,
1392-
which takes an integer. The type has an associated destructor procedure,
1393-
whose contents are specified by the block. Values of such a type can not
1394-
be copied, and when they are destroyed (by going out of scope, or, when
1395-
boxed, when their box is cleaned up), their body runs. In the example
1396-
above, this would cause the given file descriptor to be closed.
1397-
1398-
NOTE: We're considering alternative approaches for data types with
1399-
destructors. Resources might go away in the future.
1380+
NOTE: Section on resources removed. ToDo: document classes and destructors
14001381
14011382
# Argument passing
14021383
@@ -1581,7 +1562,7 @@ without any sophistication).
15811562
## Kinds
15821563
15831564
Perhaps surprisingly, the 'copy' (duplicate) operation is not defined
1584-
for all Rust types. Resource types (types with destructors) can not be
1565+
for all Rust types. Resource types (classes with destructors) cannot be
15851566
copied, and neither can any type whose copying would require copying a
15861567
resource (such as records or unique boxes containing a resource).
15871568

0 commit comments

Comments
 (0)