fix redirect pages

This commit is contained in:
Steve Klabnik 2018-11-20 17:59:52 -05:00
parent 17763783dd
commit 6c524fa894
16 changed files with 33 additions and 129 deletions

View File

@ -13,11 +13,5 @@ pub trait Iterator {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.03 — Advanced Traits][2]**
* <small>[In the first edition: Ch 3.30 — Associated Types][1]</small>
[1]: first-edition/associated-types.html
[2]: second-edition/ch19-03-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types
You can find the latest version of this information
[here](ch19-03-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types).

View File

@ -13,13 +13,9 @@ static HELLO_WORLD: &str = "Hello, world!";
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 3.01 — Variables and Mutability, section Constants][2]**
* **[In the second edition: Ch 19.01 — Unsafe Rust, section Static Variables][3]**
* <small>[In the first edition: Ch 3.26 — `const` and `static`][1]</small>
You can find the latest version about constants
[here](ch03-01-variables-and-mutability.html#differences-between-variables-and-constants),
and about statics
[here](ch19-01-unsafe-rust.html#accessing-or-modifying-a-mutable-static-variable).
[1]: first-edition/const-and-static.html
[2]: second-edition/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants
[3]: second-edition/ch19-01-unsafe-rust.html#accessing-or-modifying-a-mutable-static-variable

View File

@ -22,11 +22,5 @@ pub fn add_one(x: i32) -> i32 {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 14.02 — Publishing to crates.io, section Making useful documentation][2]**
* <small>[In the first edition: Ch 4.4 — Documentation][1]</small>
[1]: first-edition/documentation.html
[2]: second-edition/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments
You can find the latest version of this information
[here](ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments).

View File

@ -19,11 +19,5 @@ fn main() {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.01 — Unsafe Rust, section `extern` functions][2]**
* <small>[In the first edition: Ch 4.9 — FFI][1]</small>
[1]: first-edition/ffi.html
[2]: second-edition/ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code
You can find the latest version of this information
[here](ch19-01-unsafe-rust.html#using-extern-functions-to-call-external-code)

View File

@ -18,11 +18,5 @@ fn main() {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 3.05 — Control flow][2]**
* <small>[In the first edition: Ch 3.5 — if][1]</small>
[1]: first-edition/if.html
[2]: second-edition/ch03-05-control-flow.html#if-expressions
You can find the latest version of this information
[here](ch03-05-control-flow.html#if-expressions).

View File

@ -26,11 +26,5 @@ for element in a.iter() {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 3.05 — Control flow][2]**
* <small>[In the first edition: Ch 3.6 — Loops][1]</small>
[1]: first-edition/loops.html
[2]: second-edition/ch03-05-control-flow.html#repetition-with-loops
You can find the latest version of this information
[here](ch03-05-control-flow.html#repetition-with-loops).

View File

@ -32,12 +32,5 @@ fn main() {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.03 — Advanced Traits, section Operator Overloading][2]**
* [In the Rust documentation: `std::ops`][3]
* <small>[In the first edition: Ch 3.32 — Operators and Overloading][1]</small>
[1]: first-edition/operators-and-overloading.html
[2]: second-edition/ch19-03-advanced-traits.html#default-generic-type-parameters-and-operator-overloading
[3]: ../std/ops/index.html
You can find the latest version of this information
[here](ch19-03-advanced-traits.html).

View File

@ -19,13 +19,5 @@ match x {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 18.03 — Patterns][2]**
* [In the second edition: Ch 6.02 — Match][3]
* <small>[In the first edition: Ch 3.15 — Patterns][1]</small>
[1]: first-edition/patterns.html
[2]: second-edition/ch18-00-patterns.html
[3]: second-edition/ch06-02-match.html#patterns-that-bind-to-values
You can find the latest version of this information
[here](ch06-02-match.html).

View File

@ -13,11 +13,5 @@ let r2 = &mut num as *mut i32;
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.01 — Unsafe Rust, section Dereferencing a Raw Pointer][2]**
* <small>[In the first edition: Ch 3.35 — Raw Pointers][1]</small>
[1]: first-edition/raw-pointers.html
[2]: second-edition/ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer
You can find the latest version of this information
[here](ch19-01-unsafe-rust.html#dereferencing-a-raw-pointer)

View File

@ -15,15 +15,5 @@ let world = &s[6..11];
---
Here are the relevant sections in the new and old books:
* **[In second edition: Ch 8.02 — Strings][2]**
* [In second edition: Ch 4.01 — Ownership, section The String Type][3]
* [In second edition: Ch 4.03 — Slices, section String Slices][4]
* <small>[In the first edition: Ch 3.17 — Strings][1]</small>
[1]: first-edition/strings.html
[2]: second-edition/ch08-02-strings.html
[3]: second-edition/ch04-01-what-is-ownership.html#the-string-type
[4]: second-edition/ch04-03-slices.html#string-slices
You can find the latest version of this information
[here](ch08-02-strings.html).

View File

@ -9,11 +9,5 @@
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 4.01 — What is Ownership, section The Stack and the Heap][2]**
* <small>[In the first edition: Ch 4.1 — The Stack and the Heap][1]</small>
[1]: first-edition/the-stack-and-the-heap.html
[2]: second-edition/ch04-01-what-is-ownership.html#the-stack-and-the-heap
You can find the latest version of this information
[here](ch04-01-what-is-ownership.html#the-stack-and-the-heap).

View File

@ -10,12 +10,5 @@ type Kilometers = i32;
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.04 — Advanced Types, section Type Synonyms][2]**
* <small>[In the first edition: Ch 3.28 — `type` aliases][1]</small>
[1]: first-edition/type-aliases.html
[2]: second-edition/ch19-04-advanced-types.html#creating-type-synonyms-with-type-aliases
You can find the latest version of this information
[here](ch19-04-advanced-types.html#creating-type-synonyms-with-type-aliases).

View File

@ -44,11 +44,5 @@ fn main() {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.03 — Advanced Traits, section Fully Qualified Syntax][2]**
* <small>[In the first edition: Ch 3.24 — Universal Function Call Syntax][1]</small>
[1]: first-edition/ufcs.html
[2]: second-edition/ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name
You can find the latest version of this information
[here](ch19-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name).

View File

@ -14,11 +14,5 @@ fn generic<T: ?Sized>(t: &T) {
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 19.04 — Advanced Types, section Dynamically Sized Types][2]**
* <small>[In the first edition: Ch 3.31 — Unsized Types][1]</small>
[1]: first-edition/unsized-types.html
[2]: second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
You can find the latest version of this information
[here](ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait).

View File

@ -10,11 +10,5 @@ let foo = 5;
---
Here are the relevant sections in the new and old books:
* **[In the second edition: Ch 2.00 — Guessing Game Tutorial, section Variables][2]**
* <small>[In the first edition: Ch 3.1 — Variable Bindings][1]</small>
[1]: first-edition/variable-bindings.html
[2]: second-edition/ch02-00-guessing-game-tutorial.html#storing-values-with-variables
You can find the latest version of this information
[here](ch02-00-guessing-game-tutorial.html#storing-values-with-variables).

View File

@ -387,7 +387,7 @@ number of methods that are useful in a variety of situations; you can check
them out in [its documentation][docs]<!-- ignore -->. Becoming familiar with
the methods on `Option<T>` will be extremely useful in your journey with Rust.
[docs]: ../../std/option/enum.Option.html
[docs]: ../std/option/enum.Option.html
In general, in order to use an `Option<T>` value, you want to have code that
will handle each variant. You want some code that will run only when you have a