Skip to content

Commit 8ac442d

Browse files
committed
---
yaml --- r: 24572 b: refs/heads/try2 c: 1e34202 h: refs/heads/master v: v3
1 parent 59c5a32 commit 8ac442d

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
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: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 33334f3c435926422d88dcd5bfafd5e32b141111
8+
refs/heads/try2: 1e34202e7432ca546bce3e591df2baf105267bce
99
refs/heads/incoming: 05543fd04dfb3f63b453a331e239ceb1a9a219f9
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/doc/tutorial.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ fn boring_old_factorial(n: int) -> int {
2828
~~~~
2929

3030
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
3333
left off. Constructs like `while` and `if` do not require parentheses
3434
around the condition (though they allow them). Also, there's a
3535
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
123123
to be distributing binary packages for various operating systems in
124124
the future.
125125

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
129129
builds require that:
130130

131131
* You are connected to the internet, to fetch snapshots.
132132
* You can at least execute snapshot binaries of one of the forms we
133133
offer them in. Currently we build and test snapshots on:
134134
* Windows (7, server 2008 r2) x86 only
135135
* 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
137137

138138
You may find other platforms work, but these are our "tier 1" supported
139139
build environments that are most likely to work. Further platforms will
@@ -148,15 +148,15 @@ packages:
148148
* gnu make 3.81 or later
149149
* curl
150150

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.
155155

156156
~~~~ {.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
160160
$ ./configure
161161
$ make && make install
162162
~~~~
@@ -174,8 +174,8 @@ When complete, `make install` will place the following programs into
174174
* `rustdoc`, the API-documentation tool
175175
* `cargo`, the Rust package manager
176176

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
179179

180180
## Compiling your first program
181181

@@ -191,9 +191,9 @@ fn main(args: ~[str]) {
191191
If the Rust compiler was installed successfully, running `rustc
192192
hello.rs` will produce a binary called `hello` (or `hello.exe`).
193193

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:
197197

198198
~~~~ {.notrust}
199199
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
321321
underscore, and after that may contain any alphanumeric character, and
322322
more underscores.
323323

324-
NOTE: The parser doesn't currently recognize non-ascii alphabetic
324+
***Note:*** The parser doesn't currently recognize non-ascii alphabetic
325325
characters. This is a bug that will eventually be fixed.
326326

327327
The double-colon (`::`) is used as a module separator, so
@@ -1397,8 +1397,8 @@ let y = x; // Copy the pointer, increase refcount
13971397
// When x and y go out of scope, refcount goes to 0, box is freed
13981398
~~~~
13991399
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.
14021402
14031403
Shared boxes never cross task boundaries.
14041404
@@ -1442,8 +1442,8 @@ Rust vectors are always heap-allocated and unique. A value of type
14421442
`~[T]` is represented by a pointer to a section of heap memory
14431443
containing any number of values of type `T`.
14441444
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.
14471447
14481448
Vector literals are enclosed in square brackets. Dereferencing is done
14491449
with square brackets (zero-based):
@@ -1476,10 +1476,10 @@ logarithmically, so the above code generates about the same amount of
14761476
copying and reallocation as `push` implementations in most other
14771477
languages.
14781478
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`.
14831483
14841484
## Strings
14851485
@@ -1746,7 +1746,7 @@ fn plus1(&&x: int) -> int { x + 1 }
17461746
vec::map(~[1, 2, 3], plus1);
17471747
~~~~
17481748
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
17501750
restriction in the future.
17511751
17521752
# Modules and crates
@@ -2022,7 +2022,7 @@ object-oriented languages tend to solve with methods and inheritance.
20222022
For example, writing a function that can operate on multiple types of
20232023
collections.
20242024
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
20262026
applicable to more advanced use cases.
20272027
20282028
## Declaration
@@ -2463,7 +2463,7 @@ copying it by making use of [unique boxes](#unique-boxes), which allow
24632463
the sending task to release ownership of a value, so that the
24642464
receiving task can keep on using it.
24652465
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
24672467
somewhat. The tutorial documents the API as it exists today.
24682468
24692469
## Spawning a task

0 commit comments

Comments
 (0)