@@ -28,8 +28,8 @@ fn boring_old_factorial(n: int) -> int {
28
28
~~~~
29
29
30
30
Several differences from C stand out. Types do not come before, but
31
- after variable names (preceded by a colon). In local variables
32
- (introduced with ` let ` ), they are optional, and will be inferred when
31
+ after variable names (preceded by a colon). For local variables
32
+ (introduced with ` let ` ), types are optional, and will be inferred when
33
33
left off. Constructs like ` while ` and ` if ` do not require parentheses
34
34
around the condition (though they allow them). Also, there's a
35
35
tendency towards aggressive abbreviation in the keywords—` fn ` for
@@ -123,17 +123,17 @@ The Rust compiler currently must be built from a [tarball][]. We hope
123
123
to be distributing binary packages for various operating systems in
124
124
the future.
125
125
126
- *** Note: *** The Rust compiler is slightly unusual in that it is written
127
- in Rust and therefore must be built by a precompiled "snapshot" version
128
- of itself (made in an earlier state of development). As such, source
126
+ The Rust compiler is slightly unusual in that it is written in Rust
127
+ and therefore must be built by a precompiled "snapshot" version of
128
+ itself (made in an earlier state of development). As such, source
129
129
builds require that:
130
130
131
131
* You are connected to the internet, to fetch snapshots.
132
132
* You can at least execute snapshot binaries of one of the forms we
133
133
offer them in. Currently we build and test snapshots on:
134
134
* Windows (7, server 2008 r2) x86 only
135
135
* Linux (various distributions) x86 and x86-64
136
- * OSX 10.6 ("Snow leopard ") or 10.7 ("Lion") x86 and x86-64
136
+ * OSX 10.6 ("Snow Leopard ") or 10.7 ("Lion") x86 and x86-64
137
137
138
138
You may find other platforms work, but these are our "tier 1" supported
139
139
build environments that are most likely to work. Further platforms will
@@ -148,15 +148,15 @@ packages:
148
148
* gnu make 3.81 or later
149
149
* curl
150
150
151
- Assuming you're on a relatively modern Linux system and have met the
152
- prerequisites, something along these lines should work. Building from source on
153
- Windows requires some extra steps: please see the
154
- [ getting started] [ wiki-get-started ] page on the Rust wiki.
151
+ Assuming you're on a relatively modern * nix system and have met the
152
+ prerequisites, something along these lines should work. Building from
153
+ source on Windows requires some extra steps: please see the [ getting
154
+ started] [ wiki-get-started ] page on the Rust wiki.
155
155
156
156
~~~~ {.notrust}
157
- $ wget http://dl.rust-lang.org/dist/rust-0.3 .tar.gz
158
- $ tar -xzf rust-0.3 .tar.gz
159
- $ cd rust-0.3
157
+ $ wget http://dl.rust-lang.org/dist/rust-0.2 .tar.gz
158
+ $ tar -xzf rust-0.2 .tar.gz
159
+ $ cd rust-0.2
160
160
$ ./configure
161
161
$ make && make install
162
162
~~~~
@@ -174,8 +174,8 @@ When complete, `make install` will place the following programs into
174
174
* ` rustdoc ` , the API-documentation tool
175
175
* ` cargo ` , the Rust package manager
176
176
177
- [ wiki-get-started ] : https://github.com/mozilla/rust/wiki/Doc -getting-started
178
- [ tarball ] : http://dl.rust-lang.org/dist/rust-0.1 .tar.gz
177
+ [ wiki-get-started ] : https://github.com/mozilla/rust/wiki/Note -getting-started-developing-Rust
178
+ [ tarball ] : http://dl.rust-lang.org/dist/rust-0.2 .tar.gz
179
179
180
180
## Compiling your first program
181
181
@@ -191,9 +191,9 @@ fn main(args: ~[str]) {
191
191
If the Rust compiler was installed successfully, running `rustc
192
192
hello.rs` will produce a binary called ` hello` (or ` hello.exe`).
193
193
194
- If you modify the program to make it invalid (for example, change the
195
- function to an unknown name ), and then compile it, you'll see an error
196
- message like this:
194
+ If you modify the program to make it invalid (for example, by changing
195
+ ` io::println ` to some nonexistent function ), and then compile it,
196
+ you'll see an error message like this:
197
197
198
198
~~~~ {.notrust}
199
199
hello.rs:2:4: 2:16 error: unresolved name: io::print_it
@@ -321,7 +321,7 @@ Rust identifiers must start with an alphabetic character or an
321
321
underscore, and after that may contain any alphanumeric character, and
322
322
more underscores.
323
323
324
- NOTE: The parser doesn't currently recognize non-ascii alphabetic
324
+ *** Note: *** The parser doesn't currently recognize non-ascii alphabetic
325
325
characters. This is a bug that will eventually be fixed.
326
326
327
327
The double-colon (` :: ` ) is used as a module separator, so
@@ -1397,8 +1397,8 @@ let y = x; // Copy the pointer, increase refcount
1397
1397
// When x and y go out of scope, refcount goes to 0, box is freed
1398
1398
~~~~
1399
1399
1400
- NOTE: We may in the future switch to garbage collection, rather than
1401
- reference counting, for shared boxes.
1400
+ ***Note:*** We may in the future switch to garbage collection, rather
1401
+ than reference counting, for shared boxes.
1402
1402
1403
1403
Shared boxes never cross task boundaries.
1404
1404
@@ -1442,8 +1442,8 @@ Rust vectors are always heap-allocated and unique. A value of type
1442
1442
`~[T]` is represented by a pointer to a section of heap memory
1443
1443
containing any number of values of type `T`.
1444
1444
1445
- NOTE: This uniqueness is turning out to be quite awkward in practice,
1446
- and might change in the future.
1445
+ ***Note:*** This uniqueness is turning out to be quite awkward in
1446
+ practice, and might change in the future.
1447
1447
1448
1448
Vector literals are enclosed in square brackets. Dereferencing is done
1449
1449
with square brackets (zero-based):
@@ -1476,10 +1476,10 @@ logarithmically, so the above code generates about the same amount of
1476
1476
copying and reallocation as `push` implementations in most other
1477
1477
languages.
1478
1478
1479
- NOTE: Actually, current , growing a vector is *exactly* as inefficient
1480
- as it looks, since vector + has been moved to the libraries and rust's
1481
- operator overloading support is insufficient to allow this
1482
- optimization. Try using `vec::push`.
1479
+ ***Note:*** Actually, currently , growing a vector is *exactly* as
1480
+ inefficient as it looks, since vector `+` has been moved to the
1481
+ libraries and Rust's operator overloading support is insufficient to
1482
+ allow this optimization. Try using `vec::push`.
1483
1483
1484
1484
## Strings
1485
1485
@@ -1746,7 +1746,7 @@ fn plus1(&&x: int) -> int { x + 1 }
1746
1746
vec::map(~[1, 2, 3], plus1);
1747
1747
~~~~
1748
1748
1749
- NOTE : This is inconvenient, and we are hoping to get rid of this
1749
+ ***Note:*** : This is inconvenient, and we are hoping to get rid of this
1750
1750
restriction in the future.
1751
1751
1752
1752
# Modules and crates
@@ -2022,7 +2022,7 @@ object-oriented languages tend to solve with methods and inheritance.
2022
2022
For example, writing a function that can operate on multiple types of
2023
2023
collections.
2024
2024
2025
- NOTE : This feature is very new, and will need a few extensions to be
2025
+ ***Note:*** : This feature is very new, and will need a few extensions to be
2026
2026
applicable to more advanced use cases.
2027
2027
2028
2028
## Declaration
@@ -2463,7 +2463,7 @@ copying it by making use of [unique boxes](#unique-boxes), which allow
2463
2463
the sending task to release ownership of a value, so that the
2464
2464
receiving task can keep on using it.
2465
2465
2466
- NOTE: As Rust evolves, we expect the Task API to grow and change
2466
+ ***Note:***: As Rust evolves, we expect the task API to grow and change
2467
2467
somewhat. The tutorial documents the API as it exists today.
2468
2468
2469
2469
## Spawning a task
0 commit comments