Skip to content

Commit

Permalink
Redirects: get rid of the weird gap in Ch. 20 sections!
Browse files Browse the repository at this point in the history
Bonus: fix internal *numbering* references in several places where I had
missed it when renumbering the links for the new Ch. 17.
  • Loading branch information
chriskrycho committed Jan 22, 2025
1 parent 82a4a49 commit be8aef9
Show file tree
Hide file tree
Showing 39 changed files with 1,446 additions and 1,438 deletions.
2 changes: 1 addition & 1 deletion 2018-edition/src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-advanced-traits.html) instead.
version of the book](../ch20-02-advanced-traits.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion 2018-edition/src/ch19-04-advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-04-advanced-types.html) instead.
version of the book](../ch20-03-advanced-types.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-05-advanced-functions-and-closures.html) instead.
version of the book](../ch20-04-advanced-functions-and-closures.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion 2018-edition/src/ch19-06-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The 2018 edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-06-macros.html) instead.
version of the book](../ch20-05-macros.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
12 changes: 8 additions & 4 deletions book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ git-repository-url = "https://github.com/rust-lang/book"
"ch18-03-pattern-syntax.html" = "ch19-03-pattern-syntax.html"
"ch19-00-advanced-features.html" = "ch20-00-advanced-features.html"
"ch19-01-unsafe-rust.html" = "ch20-01-unsafe-rust.html"
"ch19-03-advanced-traits.html" = "ch20-03-advanced-traits.html"
"ch19-04-advanced-types.html" = "ch20-04-advanced-types.html"
"ch19-05-advanced-functions-and-closures.html" = "ch20-05-advanced-functions-and-closures.html"
"ch19-06-macros.html" = "ch20-06-macros.html"
"ch19-03-advanced-traits.html" = "ch20-02-advanced-traits.html"
"ch20-03-advanced-traits.html" = "ch20-02-advanced-traits.html"
"ch19-04-advanced-types.html" = "ch20-03-advanced-types.html"
"ch20-04-advanced-types.html" = "ch20-03-advanced-types.html"
"ch19-05-advanced-functions-and-closures.html" = "ch20-04-advanced-functions-and-closures.html"
"ch20-05-advanced-functions-and-closures.html" = "ch20-04-advanced-functions-and-closures.html"
"ch19-06-macros.html" = "ch20-05-macros.html"
"ch20-06-macros.html" = "ch20-05-macros.html"
"ch20-00-final-project-a-web-server.html" = "ch21-00-final-project-a-web-server.html"
"ch20-01-single-threaded.html" = "ch21-01-single-threaded.html"
"ch20-02-multithreaded.html" = "ch21-02-multithreaded.html"
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/associated-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types) instead.
version of the book](../ch20-02-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-06-macros.html) instead.
version of the book](../ch20-05-macros.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/operators-and-overloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-advanced-traits.html#default-generic-type-parameters-and-operator-overloading) instead.
version of the book](../ch20-02-advanced-traits.html#default-generic-type-parameters-and-operator-overloading) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/procedural-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-06-macros.html?highlight=procedural#procedural-macros-for-generating-code-from-attributes) instead.
version of the book](../ch20-05-macros.html?highlight=procedural#procedural-macros-for-generating-code-from-attributes) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/type-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-04-advanced-types.html#creating-type-synonyms-with-type-aliases) instead.
version of the book](../ch20-03-advanced-types.html#creating-type-synonyms-with-type-aliases) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion first-edition/src/unsized-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The first edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait) instead.
version of the book](../ch20-03-advanced-types.html#dynamically-sized-types-and-the-sized-trait) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion redirects/associated-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ pub trait Iterator {
---

You can find the latest version of this information
[here](ch20-03-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types).
[here](ch20-02-advanced-traits.html#specifying-placeholder-types-in-trait-definitions-with-associated-types).
2 changes: 1 addition & 1 deletion redirects/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn main() {

Here are the relevant sections in the new and old books:

* **[In the current edition: Ch 19.06 Macros][2]**
* **[In the current edition: Ch 20.05 Macros][2]**
* [Rust By Example: Macros][3]
* [In the Rust Reference: Ch 3.1 — Macros by Example][4]
* <small>[In the first edition: Ch 3.34 — Macros][1]</small>
Expand Down
2 changes: 1 addition & 1 deletion redirects/match.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn value_in_cents(coin: Coin) -> u32 {
Here are the relevant sections in the new and old books:

* **[in the current edition: Ch 6.02 — The `match` Control Flow Operator][2]**
* [in the current edition: Ch 18.00 — Patterns][3]
* [in the current edition: Ch 19.00 — Patterns][3]
* <small>[In the first edition: Ch 3.14 — Match][1]</small>


Expand Down
2 changes: 1 addition & 1 deletion redirects/operators-and-overloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ fn main() {
---

You can find the latest version of this information
[here](ch20-03-advanced-traits.html).
[here](ch20-02-advanced-traits.html).
4 changes: 2 additions & 2 deletions redirects/procedural-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
This chapter does not exist yet in [the second edition][2].
You can check out other resources that describe macros.

* **[In the current edition: Ch 19.06 Macros][2]**
* **[In the current edition: Ch 20.05 Macros][2]**
* [In the Rust Reference: Ch 3.2 — Procedural Macros][4]
* [The `proc_macro` crate documentation][3]
* <small>[In the first edition: Ch 4.13 — Procedural Macros (and custom Derive)][1]</small>


[1]: https://doc.rust-lang.org/1.30.0/book/first-edition/procedural-macros.html
[2]: ch20-06-macros.html
[2]: ch20-05-macros.html
[3]: ../proc_macro/index.html
[4]: ../reference/procedural-macros.html
2 changes: 1 addition & 1 deletion redirects/trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ fn main() {

Here are the relevant sections in the new and old books:

* **[in the current edition: Ch 17.02 — Trait Objects][2]**
* **[in the current edition: Ch 18.02 — Trait Objects][2]**
* <small>[In the first edition: Ch 3.22 — Trait Objects][1]</small>


Expand Down
4 changes: 2 additions & 2 deletions redirects/traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub trait Summarizable {
Here are the relevant sections in the new and old books:

* **[in the current edition: Ch 10.02 — Traits][2]**
* [in the current edition: Ch 19.03 — Advanced Traits][3]
* [in the current edition: Ch 20.03 — Advanced Traits][3]
* <small>[In the first edition: Ch 3.19 — Traits][1]</small>


[1]: https://doc.rust-lang.org/1.30.0/book/first-edition/traits.html
[2]: ch10-02-traits.html
[3]: ch20-03-advanced-traits.html
[3]: ch20-02-advanced-traits.html
2 changes: 1 addition & 1 deletion redirects/type-aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ type Kilometers = i32;
---

You can find the latest version of this information
[here](ch20-04-advanced-types.html#creating-type-synonyms-with-type-aliases).
[here](ch20-03-advanced-types.html#creating-type-synonyms-with-type-aliases).
2 changes: 1 addition & 1 deletion redirects/ufcs.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ fn main() {
---

You can find the latest version of this information
[here](ch20-03-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name).
[here](ch20-02-advanced-traits.html#fully-qualified-syntax-for-disambiguation-calling-methods-with-the-same-name).
2 changes: 1 addition & 1 deletion redirects/unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Here are the relevant sections in the new and old books:

* **[in the current edition: Ch 19.01 — Unsafe Rust][2]**
* **[in the current edition: Ch 20.01 — Unsafe Rust][2]**
* [The Rustonomicon, The Dark Arts of Advanced and Unsafe Rust Programming][3]
* <small>[In the first edition: Ch 3.36 — `unsafe`][1]</small>

Expand Down
2 changes: 1 addition & 1 deletion redirects/unsized-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ fn generic<T: ?Sized>(t: &T) {
---

You can find the latest version of this information
[here](ch20-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait).
[here](ch20-03-advanced-types.html#dynamically-sized-types-and-the-sized-trait).
2 changes: 1 addition & 1 deletion second-edition/src/appendix-04-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The second edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-06-macros.html) instead.
version of the book](../ch20-05-macros.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion second-edition/src/ch19-03-advanced-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The second edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-03-advanced-traits.html) instead.
version of the book](../ch20-02-advanced-traits.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
2 changes: 1 addition & 1 deletion second-edition/src/ch19-04-advanced-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The second edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-04-advanced-types.html) instead.
version of the book](../ch20-03-advanced-types.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The second edition of the book is no longer distributed with Rust's documentation.

If you came here via a link or web search, you may want to check out [the current
version of the book](../ch20-05-advanced-functions-and-closures.html) instead.
version of the book](../ch20-04-advanced-functions-and-closures.html) instead.

If you have an internet connection, you can [find a copy distributed with
Rust
Expand Down
8 changes: 4 additions & 4 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@

- [Advanced Features](ch20-00-advanced-features.md)
- [Unsafe Rust](ch20-01-unsafe-rust.md)
- [Advanced Traits](ch20-03-advanced-traits.md)
- [Advanced Types](ch20-04-advanced-types.md)
- [Advanced Functions and Closures](ch20-05-advanced-functions-and-closures.md)
- [Macros](ch20-06-macros.md)
- [Advanced Traits](ch20-02-advanced-traits.md)
- [Advanced Types](ch20-03-advanced-types.md)
- [Advanced Functions and Closures](ch20-04-advanced-functions-and-closures.md)
- [Macros](ch20-05-macros.md)

- [Final Project: Building a Multithreaded Web Server](ch21-00-final-project-a-web-server.md)
- [Building a Single-Threaded Web Server](ch21-01-single-threaded.md)
Expand Down
2 changes: 1 addition & 1 deletion src/appendix-03-derivable-traits.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ The `Default` trait is required when you use the method `unwrap_or_default` on
[creating-instances-from-other-instances-with-struct-update-syntax]: ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax
[stack-only-data-copy]: ch04-01-what-is-ownership.html#stack-only-data-copy
[ways-variables-and-data-interact-clone]: ch04-01-what-is-ownership.html#ways-variables-and-data-interact-clone
[macros]: ch20-06-macros.html#macros
[macros]: ch20-05-macros.html#macros
2 changes: 1 addition & 1 deletion src/ch18-02-trait-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,5 @@ that we wrote in Listing 18-5 and were able to support in Listing 18-9, so it’
a trade-off to consider.

[performance-of-code-using-generics]: ch10-01-syntax.html#performance-of-code-using-generics
[dynamically-sized]: ch20-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait
[dynamically-sized]: ch20-03-advanced-types.html#dynamically-sized-types-and-the-sized-trait
[dyn-compatibility]: https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility
2 changes: 1 addition & 1 deletion src/ch18-03-oo-design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,4 +503,4 @@ lots of flexibility. We’ve looked at them briefly throughout the book but
haven’t seen their full capability yet. Let’s go!

[more-info-than-rustc]: ch09-03-to-panic-or-not-to-panic.html#cases-in-which-you-have-more-information-than-the-compiler
[macros]: ch20-06-macros.html#macros
[macros]: ch20-05-macros.html#macros
Loading

0 comments on commit be8aef9

Please sign in to comment.