Skip to content

Commit d35ad98

Browse files
committed
---
yaml --- r: 6096 b: refs/heads/master c: eed782c h: refs/heads/master v: v3
1 parent c38ede3 commit d35ad98

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
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: eef9a0bd3941a6d2d25db4635295198903575e6b
2+
refs/heads/master: eed782c7783f3f7dd57323e238e674bf4cfe77a9

trunk/doc/tutorial/syntax.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ constants can be defined with `const`:
109109

110110
## Types
111111

112-
The `-> bool` in the last example is the way a function's return type
113-
is written. For functions that do not return a meaningful value (these
114-
conceptually return nil in Rust), you can optionally say `-> ()` (`()`
115-
is how nil is written), but usually the return annotation is simply
116-
left off, as in the `fn main() { ... }` examples we've seen earlier.
112+
The `-> bool` in the `is_four` example is the way a function's return
113+
type is written. For functions that do not return a meaningful value
114+
(these conceptually return nil in Rust), you can optionally say `->
115+
()` (`()` is how nil is written), but usually the return annotation is
116+
simply left off, as in the `fn main() { ... }` examples we've seen
117+
earlier.
117118

118119
Every argument to a function must have its type declared (for example,
119120
`x: int`). Inside the function, type inference will be able to

0 commit comments

Comments
 (0)