Skip to content

Commit b4bff57

Browse files
committed
rollup merge of rust-lang#17277 : steveklabnik/doc_fix_rollup
2 parents e8a3ac5 + 51b4c51 commit b4bff57

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

src/doc/guide.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -392,14 +392,10 @@ By the way, in these examples, `i` indicates that the number is an integer.
392392

393393
Rust is a statically typed language, which means that we specify our types up
394394
front. 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
395+
"type inference." If it can figure out what the type of something is, Rust
400396
doesn't require you to actually type it out.
401397

402-
We can add the type if we want to. Types come after a colon (`:`):
398+
We can add the type if we want to, though. Types come after a colon (`:`):
403399

404400
```{rust}
405401
let x: int = 5;
@@ -1281,15 +1277,15 @@ two main looping constructs: `for` and `while`.
12811277

12821278
The `for` loop is used to loop a particular number of times. Rust's `for` loops
12831279
work a bit differently than in other systems languages, however. Rust's `for`
1284-
loop doesn't look like this C `for` loop:
1280+
loop doesn't look like this "C style" `for` loop:
12851281

1286-
```{ignore,c}
1282+
```{c}
12871283
for (x = 0; x < 10; x++) {
12881284
printf( "%d\n", x );
12891285
}
12901286
```
12911287

1292-
It looks like this:
1288+
Instead, it looks like this:
12931289

12941290
```{rust}
12951291
for x in range(0i, 10i) {
@@ -1312,10 +1308,9 @@ valid for the loop body. Once the body is over, the next value is fetched from
13121308
the iterator, and we loop another time. When there are no more values, the
13131309
`for` loop is over.
13141310

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`.
1311+
In our example, `range` is a function that takes a start and an end position,
1312+
and gives an iterator over those values. The upper bound is exclusive, though,
1313+
so our loop will print `0` through `9`, not `10`.
13191314

13201315
Rust does not have the "C style" `for` loop on purpose. Manually controlling
13211316
each element of the loop is complicated and error prone, even for experienced C

src/doc/index.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ There are questions that are asked quite often, and so we've made FAQs for them:
8686

8787
# The standard library
8888

89-
You can find function-level documentation for the entire standard library
90-
[here](std/index.html). There's a list of crates on the left with more specific
91-
sections, or you can use the search bar at the top to search for something if
92-
you know its name.
89+
We have [API documentation for the entire standard
90+
library](std/index.html). There's a list of crates on the left with more
91+
specific sections, or you can use the search bar at the top to search for
92+
something if you know its name.
9393

9494
# External documentation
9595

0 commit comments

Comments
 (0)