Skip to content
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

Redirects: get rid of the weird gap in Ch. 20 sections! #4209

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 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.02 — 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
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ behavior—we would have to implement just the methods we do want manually.
This newtype pattern is also useful even when traits are not involved. Let’s
switch focus and look at some advanced ways to interact with Rust’s type system.

[newtype]: ch20-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
[newtype]: ch20-02-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
[implementing-a-trait-on-a-type]: ch10-02-traits.html#implementing-a-trait-on-a-type
[traits-defining-shared-behavior]: ch10-02-traits.html#traits-defining-shared-behavior
[smart-pointer-deref]: ch15-02-deref.html#treating-smart-pointers-like-regular-references-with-the-deref-trait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,4 @@ Next, we’ll talk about functions and closures!
[string-slices]: ch04-03-slices.html#string-slices
[the-match-control-flow-operator]: ch06-02-match.html#the-match-control-flow-operator
[using-trait-objects-that-allow-for-values-of-different-types]: ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
[using-the-newtype-pattern]: ch20-03-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
[using-the-newtype-pattern]: ch20-02-advanced-traits.html#using-the-newtype-pattern-to-implement-external-traits-on-external-types
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Types”][using-trait-objects-that-allow-for-values-of-different-types]<!-- igno

Next, let’s look at macros!

[advanced-traits]: ch20-03-advanced-traits.html#advanced-traits
[advanced-traits]: ch20-02-advanced-traits.html#advanced-traits
[enum-values]: ch06-01-defining-an-enum.html#enum-values
[closure-types]: ch13-01-closures.html#closure-type-inference-and-annotation
[using-trait-objects-that-allow-for-values-of-different-types]: ch18-02-trait-objects.html#using-trait-objects-that-allow-for-values-of-different-types
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ch21-02-multithreaded.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ let` (and `if let` and `match`) does not drop temporary values until the end of
the associated block. In Listing 21-21, the lock remains held for the duration
of the call to `job()`, meaning other workers cannot receive jobs.

[creating-type-synonyms-with-type-aliases]: ch20-04-advanced-types.html#creating-type-synonyms-with-type-aliases
[creating-type-synonyms-with-type-aliases]: ch20-03-advanced-types.html#creating-type-synonyms-with-type-aliases
[integer-types]: ch03-02-data-types.html#integer-types
[fn-traits]: ch13-01-closures.html#moving-captured-values-out-of-the-closure-and-the-fn-traits
[builder]: ../std/thread/struct.Builder.html
Expand Down
Loading