@@ -29,8 +29,11 @@ $ curl -s https://static.rust-lang.org/rustup.sh | sudo sh
2929(If you're concerned about ` curl | sudo sh ` , please keep reading. Disclaimer
3030below.)
3131
32- If you're on Windows, please [ download this .exe and run
33- it] ( https://static.rust-lang.org/dist/rust-nightly-install.exe ) .
32+ If you're on Windows, please download either the [ 32-bit
33+ installer] ( https://static.rust-lang.org/dist/rust-nightly-i686-w64-mingw32.exe )
34+ or the [ 64-bit
35+ installer] ( https://static.rust-lang.org/dist/rust-nightly-x86_64-w64-mingw32.exe )
36+ and run it.
3437
3538If you decide you don't want Rust anymore, we'll be a bit sad, but that's okay.
3639Not every programming language is great for everyone. Just pass an argument to
@@ -185,8 +188,8 @@ Next up is this line:
185188This line does all of the work in our little program. There are a number of
186189details that are important here. The first is that it's indented with four
187190spaces, not tabs. Please configure your editor of choice to insert four spaces
188- with the tab key. We provide some sample configurations for various editors
189- [ here ] ( https://github.com/rust-lang/rust/tree/master/src/etc ) .
191+ with the tab key. We provide some [ sample configurations for various
192+ editors ] ( https://github.com/rust-lang/rust/tree/master/src/etc ) .
190193
191194The second point is the ` println!() ` part. This is calling a Rust ** macro** ,
192195which is how metaprogramming is done in Rust. If it were a function instead, it
@@ -392,14 +395,10 @@ By the way, in these examples, `i` indicates that the number is an integer.
392395
393396Rust is a statically typed language, which means that we specify our types up
394397front. So why does our first example compile? Well, Rust has this thing called
395- "[ Hindley-Milner type
396- inference] ( http://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system ) ",
397- named after some really smart type theorists. If you clicked that link, don't
398- be scared: what this means for you is that Rust will attempt to infer the types
399- in your program, and it's pretty good at it. If it can infer the type, Rust
398+ "type inference." If it can figure out what the type of something is, Rust
400399doesn't require you to actually type it out.
401400
402- We can add the type if we want to. Types come after a colon (` : ` ):
401+ We can add the type if we want to, though . Types come after a colon (` : ` ):
403402
404403``` {rust}
405404let x: int = 5;
@@ -1281,15 +1280,15 @@ two main looping constructs: `for` and `while`.
12811280
12821281The ` for ` loop is used to loop a particular number of times. Rust's ` for ` loops
12831282work a bit differently than in other systems languages, however. Rust's ` for `
1284- loop doesn't look like this C ` for ` loop:
1283+ loop doesn't look like this "C style" ` for ` loop:
12851284
1286- ``` {ignore, c}
1285+ ``` {c}
12871286for (x = 0; x < 10; x++) {
12881287 printf( "%d\n", x );
12891288}
12901289```
12911290
1292- It looks like this:
1291+ Instead, it looks like this:
12931292
12941293``` {rust}
12951294for x in range(0i, 10i) {
@@ -1312,10 +1311,9 @@ valid for the loop body. Once the body is over, the next value is fetched from
13121311the iterator, and we loop another time. When there are no more values, the
13131312` for ` loop is over.
13141313
1315- In our example, the ` range ` function is a function, provided by Rust, that
1316- takes a start and an end position, and gives an iterator over those values. The
1317- upper bound is exclusive, though, so our loop will print ` 0 ` through ` 9 ` , not
1318- ` 10 ` .
1314+ In our example, ` range ` is a function that takes a start and an end position,
1315+ and gives an iterator over those values. The upper bound is exclusive, though,
1316+ so our loop will print ` 0 ` through ` 9 ` , not ` 10 ` .
13191317
13201318Rust does not have the "C style" ` for ` loop on purpose. Manually controlling
13211319each element of the loop is complicated and error prone, even for experienced C
0 commit comments