Skip to content

Commit daabc8a

Browse files
committed
Auto merge of #25421 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #25404, #25405, #25407, #25408, #25410, #25412, #25413, #25414, #25418, #25420 - Failed merges:
2 parents 2792855 + 6df13d4 commit daabc8a

12 files changed

+19
-15
lines changed

src/doc/trpl/concurrency.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and more cores, yet many programmers aren't prepared to fully utilize them.
66

77
Rust's memory safety features also apply to its concurrency story too. Even
88
concurrent Rust programs must be memory safe, having no data races. Rust's type
9-
system is up to the thread, and gives you powerful ways to reason about
9+
system is up to the task, and gives you powerful ways to reason about
1010
concurrent code at compile time.
1111

1212
Before we talk about the concurrency features that come with Rust, it's important

src/doc/trpl/dining-philosophers.md

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ a name is all we need. We choose the [`String`][string] type for the name,
7373
rather than `&str`. Generally speaking, working with a type which owns its
7474
data is easier than working with one that uses references.
7575

76+
[struct]: structs.html
77+
[string]: strings.html
78+
7679
Let’s continue:
7780

7881
```rust

src/doc/trpl/enums.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ fn process_color_change(msg: Message) {
5555
}
5656
```
5757

58-
Both variants are named `Digit`, but since they’re scoped to the `enum` name
59-
there's no ambiguity.
60-
6158
Not supporting these operations may seem rather limiting, but it’s a limitation
6259
which we can overcome. There are two ways: by implementing equality ourselves,
6360
or by pattern matching variants with [`match`][match] expressions, which you’ll
@@ -66,3 +63,4 @@ equality yet, but we’ll find out in the [`traits`][traits] section.
6663

6764
[match]: match.html
6865
[if-let]: if-let.html
66+
[traits]: traits.html

src/doc/trpl/guessing-game.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ The next part will use this handle to get input from the user:
213213
```
214214

215215
Here, we call the [`read_line()`][read_line] method on our handle.
216-
[Method][method]s are like associated functions, but are only available on a
216+
[Methods][method] are like associated functions, but are only available on a
217217
particular instance of a type, rather than the type itself. We’re also passing
218218
one argument to `read_line()`: `&mut guess`.
219219

220220
[read_line]: ../std/io/struct.Stdin.html#method.read_line
221-
[method]: methods.html
221+
[method]: method-syntax.html
222222

223223
Remember how we bound `guess` above? We said it was mutable. However,
224224
`read_line` doesn’t take a `String` as an argument: it takes a `&mut String`.

src/doc/trpl/match.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ Unlike the previous uses of `match`, you can’t use the normal `if`
9797
statement to do this. You can use the [`if let`][if-let] statement,
9898
which can be seen as an abbreviated form of `match`.
9999

100-
[if-let][if-let.html]
100+
[if-let]: if-let.html

src/doc/trpl/mutability.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let y = &mut x;
3535

3636
`y` is an immutable binding to a mutable reference, which means that you can’t
3737
bind `y` to something else (`y = &mut z`), but you can mutate the thing that’s
38-
bound to `y`. (`*y = 5`) A subtle distinction.
38+
bound to `y` (`*y = 5`). A subtle distinction.
3939

4040
Of course, if you need both:
4141

src/doc/trpl/patterns.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ match x {
6666
}
6767
```
6868

69-
This prints `something else`
69+
This prints `something else`.
7070

7171
# Bindings
7272

@@ -152,7 +152,7 @@ match x {
152152
}
153153
```
154154

155-
This prints `Got an int!`
155+
This prints `Got an int!`.
156156

157157
# ref and ref mut
158158

src/doc/trpl/structs.md

+2
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,5 @@ useful. For instance, a library may ask you to create a structure that
196196
implements a certain [trait][trait] to handle events. If you don’t have
197197
any data you need to store in the structure, you can just create a
198198
unit-like struct.
199+
200+
[trait]: traits.html

src/doc/trpl/the-stack-and-the-heap.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ Next, `foo()` calls `bar()` with `x` and `z`:
430430
| 2<sup>30</sup> | | 20 |
431431
| (2<sup>30</sup>) - 1 | | 5 |
432432
| ... | ... | ... |
433-
| 10 | e | 4 |
433+
| 10 | e | 9 |
434434
| 9 | d | (2<sup>30</sup>) - 1 |
435435
| 8 | c | 5 |
436436
| 7 | b | 4 |
@@ -455,7 +455,7 @@ At the end of `bar()`, it calls `baz()`:
455455
| ... | ... | ... |
456456
| 12 | g | 100 |
457457
| 11 | f | 4 |
458-
| 10 | e | 4 |
458+
| 10 | e | 9 |
459459
| 9 | d | (2<sup>30</sup>) - 1 |
460460
| 8 | c | 5 |
461461
| 7 | b | 4 |
@@ -477,7 +477,7 @@ After `baz()` is over, we get rid of `f` and `g`:
477477
| 2<sup>30</sup> | | 20 |
478478
| (2<sup>30</sup>) - 1 | | 5 |
479479
| ... | ... | ... |
480-
| 10 | e | 4 |
480+
| 10 | e | 9 |
481481
| 9 | d | (2<sup>30</sup>) - 1 |
482482
| 8 | c | 5 |
483483
| 7 | b | 4 |

src/doc/trpl/while-loops.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Rust also has a `while` loop. It looks like this:
44

55
```{rust}
6-
let mut x = 5; // mut x: u32
6+
let mut x = 5; // mut x: i32
77
let mut done = false; // mut done: bool
88
99
while !done {

src/libcollections/str.rs

+1
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ macro_rules! utf8_acc_cont_byte {
396396

397397
#[stable(feature = "rust1", since = "1.0.0")]
398398
impl Borrow<str> for String {
399+
#[inline]
399400
fn borrow(&self) -> &str { &self[..] }
400401
}
401402

src/libstd/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//! [`result`](result/index.html) modules define optional and
4141
//! error-handling types, `Option` and `Result`. The
4242
//! [`iter`](iter/index.html) module defines Rust's iterator trait,
43-
//! [`Iterater`](iter/trait.Iterator.html), which works with the `for`
43+
//! [`Iterator`](iter/trait.Iterator.html), which works with the `for`
4444
//! loop to access collections.
4545
//!
4646
//! The common container type, `Vec`, a growable vector backed by an array,

0 commit comments

Comments
 (0)