Skip to content

Rollup of 10 pull requests #25421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 15, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b4e1ce5
trpl-docs: Specify correct type of variable binding
dnaeon May 14, 2015
acb5e02
Another thread->task fix.
dreid May 14, 2015
e2bb734
trpl: punctuation fix
durka May 14, 2015
785cbe3
I fixed the typo of the value of e in the memory tables. It is a refe…
May 14, 2015
dc6eb78
trpl: fix link from Structs to Traits
durka May 14, 2015
66c0fe0
trpl: fix link from Enums to Traits
durka May 14, 2015
c147ac4
trpl: fix link from Match to If Let
durka May 14, 2015
c8b0689
trpl: punctuation fix in Patterns
durka May 14, 2015
4bdeb31
Add #[inline] to Borrow<str>::borrow for String.
koute May 14, 2015
a1577db
TRPL: Fix Internal Link
killercup May 14, 2015
50fb669
s/Iterater/Iterator/
apasel422 May 14, 2015
82c7282
trpl: Fix missing internal links
leunggamciu May 14, 2015
1f40cde
Rollup merge of #25404 - dnaeon:doc-fixes, r=steveklabnik
steveklabnik May 15, 2015
0028f85
Rollup merge of #25405 - dreid:patch-3, r=nikomatsakis
steveklabnik May 15, 2015
c356211
Rollup merge of #25407 - durka:patch-1, r=alexcrichton
steveklabnik May 15, 2015
765a55e
Rollup merge of #25408 - Nashenas88:rust-book-stack-and-heap-typo, r=…
steveklabnik May 15, 2015
dd60abc
Rollup merge of #25410 - durka:patch-2, r=steveklabnik
steveklabnik May 15, 2015
609b4a1
Rollup merge of #25412 - koute:master, r=alexcrichton
steveklabnik May 15, 2015
aa56011
Rollup merge of #25413 - killercup:patch-11, r=alexcrichton
steveklabnik May 15, 2015
8d52274
Rollup merge of #25414 - apasel422:patch-1, r=alexcrichton
steveklabnik May 15, 2015
5501f07
Rollup merge of #25418 - leunggamciu:patch-trpl, r=steveklabnik
steveklabnik May 15, 2015
6df13d4
Rollup merge of #25420 - habnabit:master, r=steveklabnik
steveklabnik May 15, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/doc/trpl/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ and more cores, yet many programmers aren't prepared to fully utilize them.

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

Before we talk about the concurrency features that come with Rust, it's important
Expand Down
3 changes: 3 additions & 0 deletions src/doc/trpl/dining-philosophers.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ a name is all we need. We choose the [`String`][string] type for the name,
rather than `&str`. Generally speaking, working with a type which owns its
data is easier than working with one that uses references.

[struct]: structs.html
[string]: strings.html

Let’s continue:

```rust
Expand Down
1 change: 1 addition & 0 deletions src/doc/trpl/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ equality yet, but we’ll find out in the [`traits`][traits] section.

[match]: match.html
[if-let]: if-let.html
[traits]: traits.html
4 changes: 2 additions & 2 deletions src/doc/trpl/guessing-game.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ The next part will use this handle to get input from the user:
```

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

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

Remember how we bound `guess` above? We said it was mutable. However,
`read_line` doesn’t take a `String` as an argument: it takes a `&mut String`.
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/match.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ Unlike the previous uses of `match`, you can’t use the normal `if`
statement to do this. You can use the [`if let`][if-let] statement,
which can be seen as an abbreviated form of `match`.

[if-let][if-let.html]
[if-let]: if-let.html
2 changes: 1 addition & 1 deletion src/doc/trpl/mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let y = &mut x;

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

Of course, if you need both:

Expand Down
4 changes: 2 additions & 2 deletions src/doc/trpl/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ match x {
}
```

This prints `something else`
This prints `something else`.

# Bindings

Expand Down Expand Up @@ -152,7 +152,7 @@ match x {
}
```

This prints `Got an int!`
This prints `Got an int!`.

# ref and ref mut

Expand Down
2 changes: 2 additions & 0 deletions src/doc/trpl/structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,5 @@ useful. For instance, a library may ask you to create a structure that
implements a certain [trait][trait] to handle events. If you don’t have
any data you need to store in the structure, you can just create a
unit-like struct.

[trait]: traits.html
6 changes: 3 additions & 3 deletions src/doc/trpl/the-stack-and-the-heap.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ Next, `foo()` calls `bar()` with `x` and `z`:
| 2<sup>30</sup> | | 20 |
| (2<sup>30</sup>) - 1 | | 5 |
| ... | ... | ... |
| 10 | e | 4 |
| 10 | e | 9 |
| 9 | d | (2<sup>30</sup>) - 1 |
| 8 | c | 5 |
| 7 | b | 4 |
Expand All @@ -455,7 +455,7 @@ At the end of `bar()`, it calls `baz()`:
| ... | ... | ... |
| 12 | g | 100 |
| 11 | f | 4 |
| 10 | e | 4 |
| 10 | e | 9 |
| 9 | d | (2<sup>30</sup>) - 1 |
| 8 | c | 5 |
| 7 | b | 4 |
Expand All @@ -477,7 +477,7 @@ After `baz()` is over, we get rid of `f` and `g`:
| 2<sup>30</sup> | | 20 |
| (2<sup>30</sup>) - 1 | | 5 |
| ... | ... | ... |
| 10 | e | 4 |
| 10 | e | 9 |
| 9 | d | (2<sup>30</sup>) - 1 |
| 8 | c | 5 |
| 7 | b | 4 |
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/while-loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Rust also has a `while` loop. It looks like this:

```{rust}
let mut x = 5; // mut x: u32
let mut x = 5; // mut x: i32
let mut done = false; // mut done: bool
while !done {
Expand Down
1 change: 1 addition & 0 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ macro_rules! utf8_acc_cont_byte {

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

Expand Down
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//! [`result`](result/index.html) modules define optional and
//! error-handling types, `Option` and `Result`. The
//! [`iter`](iter/index.html) module defines Rust's iterator trait,
//! [`Iterater`](iter/trait.Iterator.html), which works with the `for`
//! [`Iterator`](iter/trait.Iterator.html), which works with the `for`
//! loop to access collections.
//!
//! The common container type, `Vec`, a growable vector backed by an array,
Expand Down