Skip to content

Commit f73b924

Browse files
committed
---
yaml --- r: 30999 b: refs/heads/incoming c: 3e47b4f h: refs/heads/master i: 30997: 3cc3a20 30995: c0b4530 30991: 6226c56 v: v3
1 parent e96b70a commit f73b924

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 83fdeddb914ce792aef609978675ee5c3dea0e57
9+
refs/heads/incoming: 3e47b4f17e690cb42b30fe6d09d1947556149406
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/tutorial-ffi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ define a struct type with the same contents, and declare
246246
`gettimeofday` to take a pointer to such a struct.
247247

248248
The second argument to `gettimeofday` (the time zone) is not used by
249-
this program, so it simply declares it to be a pointer to the unit
249+
this program, so it simply declares it to be a pointer to the nil
250250
type. Since all null pointers have the same representation regardless of
251251
their referent type, this is safe.
252252

branches/incoming/doc/tutorial.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ are not semicolons in the blocks of the second snippet. This is
294294
important; the lack of a semicolon after the last statement in a
295295
braced block gives the whole block the value of that last expression.
296296

297-
Put another way, the semicolon in Rust *ignores the value of an
298-
expression*. Thus, if the branches of the `if` had looked like `{ 4; }`,
299-
the above example would simply assign `()` (unit or void) to
300-
`price`. But without the semicolon, each branch has a different value,
301-
and `price` gets the value of the branch that was taken.
297+
Put another way, the semicolon in Rust *ignores the value of an expression*.
298+
Thus, if the branches of the `if` had looked like `{ 4; }`, the above example
299+
would simply assign `()` (nil or void) to `price`. But without the semicolon, each
300+
branch has a different value, and `price` gets the value of the branch that
301+
was taken.
302302

303303
In short, everything that's not a declaration (`let` for variables,
304304
`fn` for functions, et cetera) is an expression, including function bodies.
@@ -839,7 +839,7 @@ fn point_from_direction(dir: Direction) -> Point {
839839
Tuples in Rust behave exactly like structs, except that their fields
840840
do not have names (and can thus not be accessed with dot notation).
841841
Tuples can have any arity except for 0 or 1 (though you may consider
842-
unit, `()`, as the empty tuple if you like).
842+
nil, `()`, as the empty tuple if you like).
843843

844844
~~~~
845845
let mytup: (int, int, float) = (10, 20, 30.0);
@@ -891,7 +891,7 @@ fn int_to_str(i: int) -> ~str {
891891
}
892892
~~~~
893893

894-
Functions that do not return a value are said to return unit, `()`,
894+
Functions that do not return a value are said to return nil, `()`,
895895
and both the return type and the return value may be omitted from
896896
the definition. The following two functions are equivalent.
897897

0 commit comments

Comments
 (0)