Skip to content

Commit c7d2cf7

Browse files
committed
---
yaml --- r: 147132 b: refs/heads/try2 c: fab5624 h: refs/heads/master v: v3
1 parent 403ccc1 commit c7d2cf7

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a44852a2d5ac12545a3c1b55dab1c3d4070872a1
8+
refs/heads/try2: fab5624eb6373d529f21309380ea467a8b4b5664
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/tutorial.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,9 @@ xs = prepend::<int>(xs, 15);
12351235
xs = prepend::<int>(xs, 20);
12361236
~~~
12371237

1238-
In the type grammar, the language uses `Type<T, U, V>` to describe a list of
1239-
type parameters, but expressions use `identifier::<T, U, V>`.
1238+
In declarations, the language uses `Type<T, U, V>` to describe a list of type
1239+
parameters, but expressions use `identifier::<T, U, V>`, to disambiguate the
1240+
`<` operator.
12401241

12411242
## Defining list equality with generics
12421243

@@ -1313,7 +1314,7 @@ provide.
13131314

13141315
In uncommon cases, the indirection can provide a performance gain or memory
13151316
reduction by making values smaller. However, unboxed values should almost
1316-
always be preferred.
1317+
always be preferred when they are usable.
13171318

13181319
Note that returning large unboxed values via boxes is unnecessary. A large
13191320
value is returned via a hidden output parameter, and the decision on where to
@@ -1324,7 +1325,7 @@ fn foo() -> (u64, u64, u64, u64, u64, u64) {
13241325
(5, 5, 5, 5, 5, 5)
13251326
}
13261327
1327-
let x = ~foo(); // allocates, and writes the integers directly to it
1328+
let x = ~foo(); // allocates a ~ box, and writes the integers directly to it
13281329
~~~~
13291330

13301331
Beyond the properties granted by the size, an owned box behaves as a regular
@@ -1403,7 +1404,7 @@ compute_distance(managed_box, owned_box);
14031404
Here the `&` operator is used to take the address of the variable
14041405
`on_the_stack`; this is because `on_the_stack` has the type `Point`
14051406
(that is, a struct value) and we have to take its address to get a
1406-
value. We also call this _borrowing_ the local variable
1407+
reference. We also call this _borrowing_ the local variable
14071408
`on_the_stack`, because we are creating an alias: that is, another
14081409
route to the same data.
14091410

0 commit comments

Comments
 (0)